The ‘Christmas Quiz’ starter project (with no code blocks) can be found on the Scratch website at https://scratch.mit.edu/projects/1108186577/editor/ – you can open it in a new tab and code your own in a different tab (or use the offline version of Scratch).
The aim is to create a quiz based on ‘Lists’; you’ll find the ‘Make a list’ block in the ‘Variables’ section. You’ll need 2 lists – one for questions and the other for answers. The number of questions should match the number of lights on the tree, plus one for the star – ie, if you have 11 questions there should be 10 lights on the tree, as well as the star.
If your player gets a question right, a light should start changing colour (so it looks like it’s been ‘switched on’). This should continue until they get all the answers right, plus one for the star. Once the star lights up, the program shouldn’t ask any more questions. The falling snow in the background should also animate while the program is running.
In our version, you lose a point for wrong answers – so if you have switched on three lights and get the 4th answer wrong, you’ll be knocked back to two lights! You can change the rules as well as the questions for your own version if you like though.
Try to change the questions and answers but if the answers in your version are based on words, try to make sure you’ve spelled them correctly, and have any capital letters in the right places – Scratch is very particular about that sort of thing! It’s probably best to start with a shorter list of questions until you’re sure everything is working, then add more.
Remember, if you want to set up a new list, the place to look is in the ‘Variables’ section. A ‘list’ in Scratch might be called an ‘Array’ in other programming languages.
Possible extra things you could do with this program:
- set things up so that the ‘snow’ on the ground gets deeper over time, so that you have to answer all the questions before snow is higher than the tree.
- Create different sets of questions and answers to give your player a choice.
- Create different levels by adding sets of harder questions or if you’ve made the snow get deeper, make that happen quicker.
- Add music questions so that the player has to identify a tune.
- Add something that happens when the player gets all the answers right, or gets them all right first time.