๐ ๏ธ Project: the quiz contest
Section 8: ListsLesson 8.2 ยท โฑ 16 min
๐ฏ Project goal
Questions in a list and their answers in a second list. The player types their answer and finds out if they were right or wrong, and at the end their score appears.


- Question number n is get # n from the questions list, and its answer is get # n from answers.
- After every answer we add one to n, and if it becomes bigger than the number of questions the quiz is over and we hide the button.

- Add two questions to the two lists.
- Write the right answer after every mistake in a label (the code shows it in a message).
๐ Another example: a quiz with two questions
The same quiz with two shorter lists.



โ๏ธ Practise
Make the example yourself: put the parts in โ๐จ Designโ, then the blocks, and tap โถ Run.
โ๏ธ Practise here in the lessonโ Close the labor open the lab in a new page โ
๐ฏ Challenge yourself
Easy
One question from a list, and the answer from a second list with the same number.
๐ Show the solution๐ Hide the solution



Result: โ
Medium
If they get it wrong a message with the right answer appears.
๐ Show the solution๐ Hide the solution



Result: a message: โ The answer: 12
Hard
At the end it shows the score out of how many questions, and the check button is hidden.
๐ Show the solution๐ Hide the solution



Result: Your score 1 of 2

