Star Student Builder logoStar Student Builder
← Real Games Std 6–8Project 2 of 4

A Quiz That Keeps Score

🎯 The program asks questions from a list, checks the answers, and gives a mark at the end.

πŸ’‘ The idea behind it

Lists hold many values, so the questions live in data rather than in the code β€” which means adding a question does not mean rewriting anything.

🧱 Blocks you will need

ask and waitansweradd to listitem of listlength of listif … then … elserepeat

πŸ”¨ Build it

  1. Make two lists: questions and answers. Put the first question in item 1 of each.
  2. Make a variable n, set to 1, and a variable score, set to 0.
  3. repeat (length of questions): ask (item n of questions) and wait.
  4. if (answer) = (item n of answers) β†’ change score by 1 β†’ say 'Correct!' else β†’ say (join 'The answer was ' (item n of answers)).
  5. change n by 1, and after the loop, say the final score.

πŸš€ Make it harder

  • Shuffle the questions so the order differs each time.
  • Save high scores in a third list and show the best three.

🐞 Bugs you will hit

  • It always says wrong: Scratch compares text exactly, so spaces and spelling matter. Trim your list entries.
  • It asks the same question forever: you forgot 'change n by 1' inside the loop.

⬇ Need Scratch itself?

Free from MIT, in a browser or as an offline app that needs no connection at all.

Get it β†’
Ask GuruAcharya Samayeshwar