Planning for Applab Quiz
Planning for quiz.
Planning for Applab Quiz
AppLab Code Plan
- Page Order:
- Start
- Question 1
- If correct -> Correct page
- If incorrect -> Incorrect page
- For both incorrect and correct pages: click continue, continues to next question (repeat until all questions are finished)
-
Endpage
- Dictionaries are added for storing keys/values, keys being the questions/page names and the values being the correct answers
- Dictionaries are added into functions, which change depending on the question (ie: Question1 will have the ‘correct’ value as ‘button3’, whereas Question2 will have the ‘correct’ value as ‘ans1’)
- A wrong answer will direct to the incorrect_page, which is the same page for every incorrect
- The same goes for correct answers, a correct answer will direct to the correct_page
- Both the incorrect and correct pages have a ‘Continue’ button, which will change to the next question (question1, then question2, then question3, and the endpage)
Successes/Discoveries
- I was able to get the code to work using many dictionaries, lists, events, and other commands
- Buttons, correct answers, and incorrect answers were all assigned using dictionaries
- Dictionaries + keys + values tell the program which code belongs to which
- Dictionaries + functions work as commands, which the program uses to determine which page to move to
- “Question(number)” : (value) -> The number of events/button clicks that can take place; used later in the code, which the code uses to move to a different page
- Essentially, dictionaries and lists can be used with loops to move to different pages
Challenges
- Could not finish the dictionaries for the incorrect/correct pages
- Each page has an ‘onEvent’ command which sends it to the next page
- Could add a dictionary + loop for the ‘incorrect/correct’ pages that changes, and sends to a different question after being clicked