Skip to content
Game 10 Unit 1 of 6 1 hr learning time

A Question

The shape of every quiz: show a question and four numbered choices, read a number, and reveal the answer. The skeleton, before any scoring.

17% of Quiz Master

A quiz is one move repeated: ask a question, offer choices, take an answer. Build that single move first — multiple choice, so the player picks a number instead of spelling a word.

  10 BORDER 0: PAPER 0: INK 7: CLS
 130 CLS
 190 READ q$,a$,b$,c$,d$
 210 PRINT q$
 220 PRINT "1. ";a$
 230 PRINT "2. ";b$
 240 PRINT "3. ";c$
 250 PRINT "4. ";d$
 260 INPUT "Answer (1-4): ";g
 280 IF g <> 1 THEN PRINT "The answer was 1"
 290 IF g = 1 THEN PRINT "Correct!"
 610 DATA "How many legs does a spider have?","Eight","Six","Ten","Twelve"
ZX Spectrum Quiz Master: a question with four numbered options and the prompt Answer (1-4)
One question, four choices, a number for an answer — the skeleton of the quiz.

Four choices, a number

The question and its four options are plain PRINTs; the answer comes in through INPUT g — a number this time, not a string, because the player types 1, 2, 3 or 4. Numbered choices are worth the extra lines: they make the answer unambiguous (no spelling, no capitalisation) and, as the next unit shows, they make checking a single comparison — the right answer is just a number to compare against.

This is the shape every quiz keeps: show a question, list the choices, read a number, respond. Everything from here — scoring, categories, the card, the breakdown — hangs on this skeleton without changing it.

Next: keep score, and store the right answers where the program can check them.