Math Quiz

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10051 – 10121.

Gallery

Math Quiz

Source Code

   1 LET H=0
   2 GOSUB 46
   3 PRINT "MATH QUIZ"
   4 GOSUB 46
   5 PRINT "DEGREE OF DIFFICULTY(1-10)?"
   6 INPUT A
   7 IF A<0 OR A>10 THEN GOTO 6
   8 LET A=INT (A/2)
   9 IF A=0 THEN LET A=1
  10 GOSUB 46
  11 PRINT "HOW MANY QUESTIONS?"
  12 INPUT B
  13 IF B<1 THEN GOTO 12
  14 CLS 
  15 FOR G=1 TO B
  16 LET C=A*INT (10*RND)+1
  17 LET D=A*INT (10*RND)+1
  18 LET E$=STR$ C+CHR$ INT (4*RND+21)+STR$ C
  19 GOSUB 46
  20 PRINT "QUESTION NUMBER ";G
  21 GOSUB 46
  22 PRINT "WHAT IS  ";E$;"?"
  23 INPUT F
  24 PRINT "     ";F
  25 GOSUB 46
  26 IF F=VAL E$ THEN GOTO 42
  27 PRINT "INCORRECT. THE ANSWER IS ";VAL E$
  28 GOSUB 46
  29 PRINT ,"YOUR SCORE IS ";H
  30 PRINT " RIGHT OUT OF ";G
  31 PRINT "PRESS ENTER";
  32 IF G<>B THEN PRINT " TO CONT"
  33 INPUT A$
  34 CLS 
  35 NEXT G
  36 FOR K=1 TO 3
  37 GOSUB 46
  38 NEXT K
  39 PRINT "END OF QUIZ. YOUR SCORE IS ";100*H/G;,"PER CENT"
  41 STOP 
  42 LET H=H+1
  43 GOSUB 46
  44 PRINT "CORRECT. THE ANSWER IS ";F
  45 GOTO 28
  46 PRINT 
  47 PRINT 
  48 PRINT 
  49 RETURN 
  50 SAVE "1005%1"
  55 RUN 
  60 REM YOU CAN MAKE THIS PROGRAM
  65 REM DO ONLY MULTIPLICATION BY
  70 REM CHANGING THE FOLLOWING 
  75 REM LINES TO:                       18 LET E=C*D
  80 REM LINE 22 PRINT "WHAT IS ";C;" TIMES ";D;"?"
  86 REM LINE 26 IF F=E  THEN GOTO 42
  90 REM LINE 27 PRINT "INCORRECT.THE ANSWER IS ";E

People

No people associated with this content.

Scroll to Top