Build a Quiz App with Lists that contain Questions, Answers and Images
How to use 3 lists in Parallel
How to compare values between Lists
List:
Build a Question List. Copy and Paste the Questions into text blocks:
Which Navy admiral led the creation of COBOL, one of the first high level programming languages?
Which recent movie showcases the first African-American women who worked as human “computers” for NASA?
Which computer science pioneer broke the German Enigma Code during the World War II?
Initialize a new variable "Index" to 1
When Screen 1 Opens
Set the Question Label Text to Question List at Index 1
Set the Index Label Text to Index Variable
When NextButton.Click,
increment the index variable to index + 1.
set the QuestionLabel.Text to the new index value
Set Index Label to new index value
Lists have a length of property that keeps track of how many items or elements are in a given list.
This is how you can check the length of the Image List
Add an if/else block to the Next Button
If the index is equal to the length of the list
set the index value to 1
Else
Add one to the index variable
Set the question label text to the new index location
Set the index label text to the new index value
When the Answer Button is clicked,
If the Answer is correct
set the Answer Label to “Correct”
Else:
set the Answer Label to “Wrong”
Hint: Use the UPPER CASE block to change the user's answer to all Lower Case
Add a “correct answer” variable and a correct label to keep track of how many correct answers the user gives.
Add a “wrong answer” variable and a wrong label to keep track of how many wrong answers the user gives.
Add a Button and name it “resetButton”.
Code a procedure that sets:
the index and index label to 1
resets the question, image to index
Score variable and score label to 0
Modify your app so that “correct” and “incorrect” are spoken when the user answers a question.
Add an intro Screen with an image and directions on how to start the quiz
Add an End Screen with directions on how to re-start the quiz
Set a time limit for each question (or for Quiz overall)
Add a Timer Component
Add a Time Label
Add a Time Variable
Have timer countdown for each question and reset when the next button is clicked...or set a timer for the entire quiz
*Hint: The programming is similar to the Timer Challenge in Tourist App
Add a new button that gives the user a random question, rather than the next answer in the list