Skip to content
Game 4 Unit 3 of 6 1 hr learning time

Rating the Result

Colour-coded ratings turn a number into a judgement — green for fast, red for slow.

50% of Reflex

A time of 8 means nothing by itself. Is that good? Terrible? The program should tell you.

  10 BORDER 0: PAPER 0: INK 7: CLS
  20 RANDOMIZE
 100 CLS
 110 PRINT "Get ready..."
 200 PAUSE INT (RND * 100) + 50
 220 PRINT "NOW!"
 230 LET t = 0
 240 IF INKEY$ <> "" THEN GO TO 300
 250 LET t = t + 1
 260 GO TO 240
 300 PRINT "Your time: "; t
 310 PRINT
 320 IF t < 5 THEN INK 4: PRINT "Lightning!"
 330 IF t >= 5 AND t < 15 THEN INK 5: PRINT "Quick!"
 340 IF t >= 15 AND t < 30 THEN INK 6: PRINT "OK"
 350 IF t >= 30 THEN INK 2: PRINT "Slow..."

Five new lines at the end: a blank line (310), then four IF statements (320–350) that map the time to a word and a colour. Under 5 is green "Lightning!" Over 30 is red "Slow..."

Black ZX Spectrum screen: Your time: 5 with Quick! printed in cyan below
A sharp reaction lands a cyan 'Quick!' — press faster still for a green 'Lightning!'

The pattern is the same as Lucky Number's ratings — chain IF statements on a number, each one checking a range. Here the ranges map to reaction speed instead of guess count.