A multiplication drill for a sixth grader: ten problems with decimal or whole numbers to work on paper, each answer marked correct within .03, and a score at the end.
RUN, type each answer and press ENTER. Answers need at least two characters. Line 625 is not in the printing: it was added so that an answer of +. or -. is refused instead of stopping the program.
Published in LISTing January 1990 (Multiplication, Grade 6), and again in January 1991. Also printed in SINCUS News, March – April 1990.
Source Code
5 REM ** "I-16", 1-6-90, WF
10 REM ** MULTIPLICATION, GRADE SIX
20 RANDOMIZE
30 CLS : LET F=0
40 PRINT "You are expected to be within .03 of the correct answer to be marked correct."
50 FOR I=1 TO 10
60 GO SUB 1000: LET N1=VAL N$
70 GO SUB 1000: LET N2=VAL N$
80 LET ans=N1*N2
90 PRINT '"QUESTION No. ";I
100 PRINT " ";N1;" X ";N2;" = ";
110 INPUT T$: GO SUB 500
115 LET try=VAL H$: PRINT try
120 IF ABS (ans-try)>.03 THEN GO TO 150
130 PRINT " Correct. Press ENTER."
140 LET F=F+1: GO TO 160
150 PRINT " Wrong. Answer is ";ans: PRINT " Press ENTER."
160 INPUT z$: NEXT I
170 PRINT '"Your score was ";F;" out of 10. Press ENTER to play again."
180 INPUT z$: GO TO 30
190
500 REM ** INPUT MONITOR
510 LET H$=T$
515 IF LEN T$<2 THEN GO TO 560
520 IF T$(1)="+" OR T$(1)="-" THEN LET T$=T$(2 TO )
530 GO TO 600
560 FOR T=1 TO 120: NEXT T: GO TO 110
600 FOR T=1 TO LEN T$
610 IF (T$(T)<"0" OR T$(T)>"9") AND T$(T)<>"." THEN GO TO 110
620 NEXT T
625 IF T$="." THEN GO TO 110
630 LET S=0
640 FOR T=1 TO LEN T$
650 IF T$(T)="." THEN LET S=S+1
660 IF S>1 THEN GO TO 110
670 NEXT T
680 RETURN
690
1000 REM ** NUMBER GENERATOR
1010 LET A$=STR$ (1+900*RND*RND)+"000"
1020 LET w=2+INT (6*RND)
1030 LET N$=A$(1 TO w)
1040 RETURNNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


