- Describe the significance of the global variable index. How is indexing used with lists in this app?
- The global variable index is used to traverse through a list to select the appropriate item. In the presidents quiz it is used to select the correct question, image, and answer for each question. Indexing is important for traversing loops and arrays.
- Describe how parallel lists were used in this app. Why was the parallel structure of the lists necessary?
- The lists organized it so that the app was able to have all three components image, question, and answer linked in the same order. If they were mismatched, the app wouldn’t work properly
- Include screenshots of your code for exercises 2 and 3 from the Enhancements section.
- Include a screenshot of the code that added your extra question (exercise 4). Explain why the code for the buttons worked without any changes after the addition of the extra question
- It works because the index can take any numbers of questions and answers.
November 13, 2017