for each “item” in list get “list” – do…
- Describe your solution for the first project that added scoring. Why was an extra list necessary? Provide a screenshot of your Answer Button Click event that uses a complex algorithm with the lists.
- created a new list to correspond with the existing parallel lists to store whether or not the correct answer had already been found for each quiz question. This was necessary for ease of coding and to be able to utilize the same index as the other lists. If the user got the quiz question correct, we first check if they have already gotten credit for a correct answer for this question (“correctanswerlist” entry will be false). If they had not gotten credit yet, we change the appropriate “correctanswerlist” to true and increment the score.
- Describe your solution for the second project that added a Search button. Provide a screenshot of the search button click code that uses a complex algorithm with loops and lists. Why was a loop necessary?
- I used the for each loop suggested and used an if or then construct to test if the search text was in either the answer or the question. The loop was necessary because we had to search through every possible quiz question/answer to find the correct one.