Routine H-35 covers problems in long division and is similar in construction to H-34. The two routines could have been combined and supplied with a menu for choosing which operation to play, but I decided against this. Multiplication is usually taught several weeks before long division. They are not taught concurrently. Hence there is little to be gained by a combination.
It is very easy on the TS2068 to convert one similar program into another, as editing is simple on this computer. Starting with the LISTing of H-34, I altered the following lines….
5, 10, 20, 40, 80, 100, & 120
By comparing them you should be able to discern the particular action taken. But line 120 may need a further explanation. In H-34 we compared the student’s response “try” with the computer’s “ans”, and allowed them to differ by no more than .03 in value. In division the difference is not a good criterion as all of the answers will be small. Therefore we used a ratio in the H-35 routine so that to score correctly, the difference between the two values divided by the computer’s value agrees to within 6 significant figures. This requires that the student carry his work out to 6 figures, but it also limits his work to this extent.
H-35 has an added subroutine, lines 1500 to 1540, which generate the traditional division symbol which is not on most computers, including the Timex. This symbol, once generated, can be printed out simply by calling for CHR$ 146, or by the letter “A” in graphics. In this tutorial the graphics letter A was used and the symbol printed in its place. One of the many nice features of the Timex is its ability to mix graphics and text at any time and any where on the screen. Most other computers, operating in basic, cannot do this.
You can use this subroutine in other programs and can add up to 19 additional special symbols. More than 20 can be added but an explanation of the method will have to wait for an other day. The first two subroutines can also be incorporated into other programs. They may need to be altered slightly to suit your application.
Warren Fricke
H-35
5 REM ** "I-17", 1-6-90, WF
10 REM ** LONG DIVISION,
GRADE SIX
20 RANDOMIZE : GO SUB 1500
30 CLS : LET F=0
40 PRINT "You are expected to
be correct in the first 6 signi
ficant fig- ures to be marked co
rrect."
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;" ÷ ";N2;" =
";
110 INPUT T$: GO SUB 500
115 LET try=VAL H$: PRINT try
120 IF ABS (ans-try)/ans>1E-5 T
HEN GO TO 150
130 PRINT " Correct. Press E
NTER."
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 t
o 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)="-" T
HEN 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
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 RETURN
1050
1500 REM ** GENERATE ÷ SYMBOL
1510 FOR T=USR "a" TO USR "a"+7
1520 READ w: POKE T,w: NEXT T
1530 DATA 0,24,0,255,0,24,0,0
1540 RETURN
You are expected to be correct in the first 6 significant fig- ures to be marked correct. QUESTION No. 1 33 ÷ 77.8318 = 0.423991 Correct. Press ENTER. QUESTION No. 2 116.6 ÷ 12.9 = 9.03872 Correct. Press ENTER. QUESTION No. 3 209 ÷ 3.79436 = 55.182 Wrong. Answer is 55.081753 Press ENTER.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.