10 CLS
20 LOCATE 12,1,1:PRINT"Change a saved program? (y/n) ";
30 E$=INPUT$(1)
40 IF E$=CHR$(27) GOTO 4600
50 IF E$="n" OR E$="N" GOTO 160
60 IF E$<>"y" AND E$<>"Y" GOTO 30
70 CLS
80 LOCATE ,,0
90 GOSUB 4190
100 CLS
110 LOCATE 13,11,0:PRINT"One moment, please!"
120 OPEN "I",#1,S$
130 INPUT#1,GRD,FORM$,TYP$,TLIMIT$,BNDA,BNDB,BNDC,BNDD,BNDE,TEST,BASE,SEL
140 CLOSE#1
150 GOTO 240
160 CLS
170 LOCATE 10,1:PRINT"Presently, Math Tutor is set to test thestudent at the passing level for each grade(1-6). However, this can be easilyaltered to an intermediate level or to specific areas where tutoring is needed."
180 LOCATE 17,1,1:PRINT "What grade do you want to alter? ";
190 E$=INPUT$(1)
200 IF E$=CHR$(27) GOTO 4600
210 IF E$<"1" OR E$>"6" GOTO 190
220 GRD=VAL(E$)
230 ON GRD GOSUB 4360,4390,4420,4450,4480,4510
240 ON GRD GOSUB 3740,3770,3800,3830,3860,3890
250 C(1)=6:C(2)=8:C(3)=10:C(4)=12:C(5)=14
260 D(1)=2:D(2)=4:D(3)=9:D(4)=11:D(5)=13:D(6)=15:D(7)=17:D(8)=34
270 CLS
280 LOCATE 13,11,0:PRINT"One moment, please!"
290 GOTO 420
300 FOR I=1 TO 5
310 FOR H=1 TO 7
320 INPUT A$(I,H)
330 NEXT H
340 NEXT I
350 OPEN "O",#1,"GRD5"
360 FOR I=1 TO 5
370 FOR H=1 TO 7
380 WRITE#1,A$(I,H)
390 NEXT H
400 NEXT I
410 CLOSE#1
420 Q$=STR$(GRD)
430 E$=RIGHT$(Q$,1)
440 S$="GRD"+E$
450 OPEN "I",#1,S$
460 FOR I=1 TO 5
470 FOR H=1 TO 7
480 INPUT#1,A$(I,H)
490 NEXT H
500 NEXT I
510 CLOSE#1
520 A$(1,8)=STR$(BNDA)
530 A$(2,8)=STR$(BNDB)
540 A$(3,8)=STR$(BNDC)
550 A$(4,8)=STR$(BNDD)
560 A$(5,8)=STR$(BNDE)
570 CLS
580 PRINT" ???????????????????????????????"
590 PRINT" GRD"GRD"? TYPE ? PROBLEM ?UPPER?"
600 PRINT"??????????????? ? ?"
610 PRINT"?FORMAT?1?2?3?4? DESCRIPTION ?LIMIT?"
620 PRINT"??????????????????????????????????????"
630 PRINT"? ? ? ? ? ? ? ? ?"
640 FOR I=1 TO 4
650 PRINT"??????????????????????????????????????"
660 PRINT"? ? ? ? ? ? ? ? ?"
670 NEXT I
680 PRINT"???????????????????????????????????????"
690 FOR I=1 TO 5
700 FOR H=1 TO 8
710 LOCATE C(I),D(H):PRINT A$(I,H)
720 NEXT H
730 NEXT I
740 IF GRD<>1 GOTO 760
750 LOCATE 16,2:PRINT"* no carries"
760 LOCATE 20,1
770 LOCATE 18,1:PRINT"Listed above are the TYPE of problems that are available for each FORMAT. A blank indicates a combination that is not authorized for this grade."
780 LOCATE 23,1,1:PRINT"Press ";CHR$(17);CHR$(196);CHR$(217);" to continue. ";
790 E$=INPUT$(1)
800 IF E$=CHR$(27) GOTO 4600
810 IF E$<>CHR$(13) GOTO 790
820 GOSUB 4540
830 LOCATE 17,1:PRINT" a z a b c e z"
840 LOCATE 18,1:PRINT"+ b - a x b ???? ? ? ? = ?"
850 LOCATE 19,1:PRINT" ?? ?? ?? a? z d f g"
860 LOCATE 20,1:PRINT" z b z (LCD?a)"
870 LOCATE 22,1:PRINT"The UPPER LIMIT controls a and b of eachproblem. Others depend on a and b."
880 LOCATE 24,1,1:PRINT"Press ";CHR$(17);CHR$(196);CHR$(217);" to continue. ";
890 E$=INPUT$(1)
900 IF E$=CHR$(27) GOTO 4600
910 IF E$<>CHR$(13) GOTO 890
920 GOSUB 4540
930 LOCATE 17,1:PRINT"The program uses a recurring sequence often problem presentations. The first number of each sequence is for problems 1,11,21,etc. The second, for 2,12,etc. "
940 LOCATE 21,1:PRINT"FORMAT sequence " FORM$
950 PRINT"TYPE sequence " TYP$
960 LOCATE 24,1,1:PRINT"Do you want to make a change? (y/n) ";
970 E$=INPUT$(1)
980 IF E$=CHR$(27) GOTO 4600
990 IF E$="n" OR E$="N" GOTO 1430
1000 IF E$<>"y" AND E$<>"Y" GOTO 970
1010 GOSUB 4540
1020 LOCATE 18,2:PRINT "Enter new FORMAT "FORM$
1030 PRINT
1040 LOCATE 20,2:PRINT "Enter new TYPE "TYP$
1050 LOCATE 23,5:PRINT"(To correct an entry, press c)
1060 YAXIS=18:XAXIS=20
1070 FOR I=1 TO 10
1080 LOCATE YAXIS,XAXIS,1
1090 J$(I)=INPUT$(1)
1100 IF J$(I)<>"c" GOTO 1150
1110 IF I=1 GOTO 1090
1120 I=I-1
1130 XAXIS=XAXIS-1
1140 GOTO 1080
1150 IF J$(I)<"1" OR J$(I)>"5" GOTO 1090
1160 PRINT J$(I)
1170 YAXIS=YAXIS+2
1180 LOCATE YAXIS,XAXIS
1190 K$(I)=INPUT$(1)
1200 IF K$(I)<>"c" GOTO 1230
1210 YAXIS=YAXIS-2
1220 GOTO 1080
1230 IF K$(I)<"1" OR K$(I)>"4" GOTO 1190
1240 AJ=VAL(J$(I))
1250 AK=VAL(K$(I))
1260 IF A$(AJ,AK+2)<"+" GOTO 1190
1270 PRINT K$(I)
1280 YAXIS=YAXIS-2
1290 XAXIS=XAXIS+1
1300 NEXT I
1310 FORM$=""
1320 TYP$=""
1330 FOR I=1 TO 10
1340 FORM$=FORM$+J$(I)
1350 TYP$=TYP$+K$(I)
1360 NEXT I
1370 LOCATE 23,1:PRINT STRING$(38,CHR$(32));
1380 LOCATE 23,1,1:PRINT"OK (y/n) ";
1390 E$=INPUT$(1)
1400 IF E$=CHR$(27) GOTO 4600
1410 IF E$="n" OR E$="N" GOTO 1060
1420 IF E$<>"y" AND E$<>"Y" GOTO 1390
1430 GOSUB 4540
1440 LOCATE 18,1:PRINT"Randomly generated problem integers fall between zero and the UPPER LIMIT. Although the upper limit is extendable, it is only advised for the well advancedstudent."
1450 LOCATE 24,1,1:PRINT"Do you want to make a change? (y/n) ";
1460 E$=INPUT$(1)
1470 IF E$=CHR$(27) GOTO 4600
1480 IF E$="n" OR E$="N" GOTO 1950
1490 IF E$<>"y" AND E$<>"Y" GOTO 1460
1500 GOSUB 4540
1510 LOCATE 18,1:PRINT "FORMAT sequence is "FORM$
1520 LOCATE 19,1:PRINT "TYPE sequence is "TYP$
1530 LOCATE 23,1:PRINT "Enter FORMAT Enter LIMIT "
1540 LOCATE 23,14,1
1550 E$=INPUT$(1)
1560 IF E$<"1" OR E$>"5" GOTO 1550
1570 PRINT E$
1580 CHG=VAL(E$)
1590 ON CHG GOSUB 3920,3950,3980,4010,4040
1600 LOCATE 21,23:PRINT "BOUNDS"LBND"-"MBND" ";
1610 YAX=23:XAX=30
1620 FOR I=1 TO 5
1630 LOCATE YAX,XAX
1640 J$(I)=INPUT$(1)
1650 IF J$(I)=CHR$(13) GOTO 1760
1660 IF J$(I)<>"c" GOTO 1710
1670 IF I=1 GOTO 1640
1680 I=I-1
1690 XAX=XAX-1
1700 GOTO 1630
1710 IF J$(I)<"0" OR J$(I)>"9" GOTO 1640
1720 PRINT J$(I)
1730 XAX=XAX+1
1740 NEXT I
1750 IF J$(I)<>CHR$(13) GOTO 1820
1760 Y$=" "
1770 FOR H=1 TO I-1
1780 Y$=Y$+J$(H)
1790 NEXT H
1800 BND=VAL(Y$)
1810 IF BNDLBND-1 GOTO 1840
1820 LOCATE 23,30:PRINT STRING$(10,CHR$(32))
1830 GOTO 1610
1840 ON CHG GOSUB 3640,3660,3680,3700,3720
1850 A$=STR$(BND)
1860 LOCATE C(CHG),34:PRINT" "
1870 LOCATE C(CHG),34:PRINT A$;
1880 LOCATE 21,1:PRINT STRING$(39,CHR$(32));
1890 LOCATE 23,1:PRINT STRING$(39,CHR$(32));
1900 LOCATE 23,1,1:PRINT "Another? (y/n) ";
1910 E$=INPUT$(1)
1920 IF E$=CHR$(27) GOTO 4600
1930 IF E$="y" OR E$="Y" GOTO 1530
1940 IF E$<>"n" AND E$<>"N" GOTO 1910
1950 GOSUB 4540
1960 LOCATE 18,1:PRINT"Presently, the program allows "TLIMIT$"response for each problem before it is counted wrong. Pauses between problems are not timed."
1970 LOCATE 23,1,1:PRINT"Do you want to make a change? (y/n) ";
1980 E$=INPUT$(1)
1990 IF E$=CHR$(27) GOTO 4600
2000 IF E$="n" OR E$="N" GOTO 2320
2010 IF E$<>"y" AND E$<>"Y" GOTO 1980
2020 GOSUB 4540
2030 LOCATE 18,1:PRINT"Entries for MINUTES or SECONDS are two digit entries and are limited to a max- imum of 59."
2040 LOCATE 22,1:PRINT "Enter MINUTES Enter SECONDS "
2050 LOCATE 22,15,1
2060 C$=""
2070 FOR I=1 TO 2
2080 E$(I)=INPUT$(1)
2090 IF E$(I)<"0" OR E$(I)>"9" GOTO 2080
2100 PRINT E$(I)
2110 LOCATE 22,16,1
2120 C$=C$+E$(I)
2130 NEXT I
2140 IF C$>"59" OR C$<"00" GOTO 2050
2150 LOCATE 22,32,1
2160 D$=""
2170 FOR I=1 TO 2
2180 E$(I)=INPUT$(1)
2190 IF E$(I)<"0" OR E$(I)>"9" GOTO 2180
2200 PRINT E$(I)
2210 LOCATE 22,33,1
2220 D$=D$+E$(I)
2230 NEXT I
2240 IF D$>"59" OR D$<"00" GOTO 2150
2250 LOCATE 24,1,1:PRINT "OK! (y/n) ";
2260 E$=INPUT$(1)
2270 IF E$=CHR$(27) GOTO 4600
2280 IF E$="n" OR E$="N" GOTO 2040
2290 IF E$<>"y" AND E$<>"Y" GOTO 2260
2300 MID$(TLIMIT$,4,2)=C$
2310 MID$(TLIMIT$,7,2)=D$
2320 GOSUB 4540
2330 LOCATE 18,1:PRINT "Presently, the program is set to grade every"TEST"problems."
2340 LOCATE 21,1,1:PRINT"Do you want to make a change? (y/n) ";
2350 E$=INPUT$(1)
2360 IF E$=CHR$(27) GOTO 4600
2370 IF E$="n" OR E$="N" GOTO 2630
2380 IF E$<>"y" AND E$<>"Y" GOTO 2350
2390 LOCATE 23,1:PRINT"ENTER new limit. (1-1000) "
2400 YAX=23:XAX=27
2410 FOR I=1 TO 5
2420 LOCATE YAX,XAX
2430 J$(I)=INPUT$(1)
2440 IF J$(I)=CHR$(13) GOTO 2550
2450 IF J$(I)<>"c" GOTO 2500
2460 IF I=1 GOTO 2430
2470 I=I-1
2480 XAX=XAX-1
2490 GOTO 2420
2500 IF J$(I)<"0" OR J$(I)>"9" GOTO 2430
2510 PRINT J$(I)
2520 XAX=XAX+1
2530 NEXT I
2540 IF J$(I)<>CHR$(13) GOTO 2610
2550 Y$=" "
2560 FOR H=1 TO I-1
2570 Y$=Y$+J$(H)
2580 NEXT H
2590 TEST=VAL(Y$)
2600 IF TEST>0 AND TEST<1001 GOTO 2630
2610 LOCATE 23,27:PRINT STRING$(5,CHR$(32));
2620 GOTO 2400
2630 CLS
2640 LOCATE 4,1:PRINT"At the completion of the problems, the student is graded and notified of the problems he missed."
2650 LOCATE 8,1:PRINT"After an EXERCISE, the student is given a chance to re-do the missed problems. If he corrects the missed problems, he is given a chance to try a new exercise."
2660 LOCATE 13,1:PRINT"After a TEST, the program pauses until you enter the test code. You may then look at the missed problems and analyze the student's progress."
2670 LOCATE 18,1:PRINT"What do you want to do?"
2680 LOCATE 20,1:PRINT "1. an exercise"
2690 LOCATE 22,1,0:PRINT "2. a test"
2700 E$=INPUT$(1)
2710 IF E$=CHR$(27) GOTO 4600
2720 IF E$<"1" OR E$>"2" GOTO 2700
2730 SEL=VAL(E$)
2740 SEL=SEL+1
2750 CLS
2760 LOCATE 1,1:PRINT"For a set of FORMAT, TYPE, UPPER LIMIT, and GRADE parameters, the program will produce the same set of problems each time it is run."
2770 LOCATE 6,1:PRINT"This program characteristic assures thateach student receives the same test and allows for later analysis by you."
2780 LOCATE 10,1:PRINT "Random numbers used for the problems aregenerated from a SEED. Changing the SEEDproduces a new set of problem variables to further challenge the student."
2790 LOCATE 15,1:PRINT"After the student corrects an EXERCISE, the SEED is incremented by one. However,no incrementing occurs for TESTS."
2800 LOCATE 19,1:PRINT"The present SEED is "BASE
2810 LOCATE 21,1,1:PRINT "Do you want to change the SEED? (y/n) ";
2820 E$=INPUT$(1)
2830 IF E$=CHR$(27) GOTO 4600
2840 IF E$="n" OR E$="N" GOTO 3110
2850 IF E$<>"y" AND E$<>"Y" GOTO 2820
2860 LOCATE 23,1:PRINT"Enter SEED (-32767 to 32767). ";
2870 YAX=23:XAX=31
2880 FOR I=1 TO 7
2890 LOCATE YAX,XAX,1
2900 J$(I)=INPUT$(1)
2910 IF J$(I)=CHR$(13) GOTO 3030
2920 IF J$(I)<>"c" GOTO 2970
2930 IF I=1 GOTO 2900
2940 I=I-1
2950 XAX=XAX-1
2960 GOTO 2890
2970 IF J$(I)="-" OR J$(I)="." GOTO 2990
2980 IF J$(I)<"0" OR J$(I)>"9" GOTO 2900
2990 PRINT J$(I)
3000 XAX=XAX+1
3010 NEXT I
3020 IF J$(I)<>CHR$(13) GOTO 3090
3030 Y$=""
3040 FOR H=1 TO I-1
3050 Y$=Y$+J$(H)
3060 NEXT H
3070 BASE=VAL(Y$)
3080 IF ABS(BASE)<32768! GOTO 3110
3090 LOCATE 23,30,0:PRINT STRING$(8,CHR$(32))
3100 GOTO 2870
3110 CLS
3120 LOCATE 2,1:PRINT "The changes you made will be saved on the disk for later recall."
3130 GOSUB 4190
3140 LOCATE 23,8:INPUT"Name for file? ",SS$
3150 CLS
3160 LOCATE 13,11,0:PRINT"One moment, please!"
3170 ON VAL(E$) GOSUB 4070,4090,4110,4130,4150,4170
3180 OPEN "O",#1,"tdata"
3190 WRITE#1,SV1$,SV2$,SV3$,SV4$,SV5$,SV6$
3200 CLOSE#1
3210 OPEN "O",#1,S$
3220 WRITE#1,GRD,FORM$,TYP$,TLIMIT$,BNDA,BNDB,BNDC,BNDD,BNDE,TEST,BASE,SEL
3230 CLOSE#1
3240 CLS
3250 LOCATE 12,1,1:PRINT"Hard copy of the parameters? (y/n) ";
3260 E$=INPUT$(1)
3270 IF E$=CHR$(27) GOTO 4600
3280 IF E$="n" OR E$="N" GOTO 3520
3290 IF E$<>"y" AND E$<>"Y" GOTO 3260
3300 LOCATE 14,1:PRINT"Turn printer on, press ";CHR$(17);CHR$(196);CHR$(217);" ";
3310 E$=INPUT$(1)
3320 IF E$=CHR$(27) GOTO 4600
3330 IF E$<>CHR$(13) GOTO 3310
3340 LPRINT"Title - "SS$
3350 LPRINT
3360 LPRINT"Sequence of FORMAT "FORM$
3370 LPRINT"Sequence of TYPE "TYP$
3380 LPRINT
3390 LPRINT"Format 1 upper limit ="BNDA
3400 LPRINT"Format 2 upper limit ="BNDB
3410 LPRINT"Format 3 upper limit ="BNDC
3420 LPRINT"Format 4 upper limit ="BNDD
3430 LPRINT"Format 5 upper limit ="BNDE
3440 LPRINT
3450 LPRINT"Time limit = "TLIMIT$
3460 LPRINT
3470 LPRINT"Problems ="TEST
3480 LPRINT
3490 IF SEL=2 THEN LPRINT"This is an exercise." ELSE LPRINT"This is a test."
3500 LPRINT
3510 LPRINT"The SEED ="BASE
3520 CLS
3530 LOCATE 12,1:PRINT "Do you want to see the problems? (y/n)";
3540 E$=INPUT$(1)
3550 IF E$=CHR$(27) GOTO 4600
3560 IF E$="n" OR E$="N" GOTO 4600
3570 IF E$<>"y" AND E$<>"Y" GOTO 3540
3580 CLS
3590 LOCATE 13,11,0:PRINT"One moment please!"
3600 RE=1
3610 SEL=5
3620 COMMON GRD,FORM$,TYP$,TLIMIT$,BNDA,BNDB,BNDC,BNDD,BNDE,TEST,BASE,SEL,RE,MPROB
3630 CHAIN "a:math",330
3640 BNDA=BND
3650 RETURN
3660 BNDB=BND
3670 RETURN
3680 BNDC=BND
3690 RETURN
3700 BNDD=BND
3710 RETURN
3720 BNDE=BND
3730 RETURN
3740 MBNDA=99:MBNDB=24:MBNDC=20:MBNDD=9:MBNDE=999
3750 LBNDA=3:LBNDB=3:LBNDC=4:LBNDD=9:LBNDE=9
3760 RETURN
3770 MBNDA=99:MBNDB=50:MBNDC=50:MBNDD=12:MBNDE=999
3780 LBNDA=3:LBNDB=3:LBNDC=4:LBNDD=3:LBNDE=9
3790 RETURN
3800 MBNDA=999:MBNDB=12:MBNDC=12:MBNDD=999:MBNDE=999
3810 LBNDA=3:LBNDB=3:LBNDC=4:LBNDD=3:LBNDE=9
3820 RETURN
3830 MBNDA=9999:MBNDB=999:MBNDC=9999:MBNDD=18:MBNDE=18
3840 LBNDA=9:LBNDB=9:LBNDC=9:LBNDD=8:LBNDE=8
3850 RETURN
3860 MBNDA=9999:MBNDB=999:MBNDC=24:MBNDD=24:MBNDE=24
3870 LBNDA=9:LBNDB=9:LBNDC=8:LBNDD=8:LBNDE=8
3880 RETURN
3890 MBNDA=9999:MBNDB=999:MBNDC=50:MBNDD=50:MBNDE=50
3900 LBNDA=4:LBNDB=4:LBNDC=8:LBNDD=8:LBNDE=8
3910 RETURN
3920 MBND=MBNDA
3930 LBND=LBNDA
3940 RETURN
3950 MBND=MBNDB
3960 LBND=LBNDB
3970 RETURN
3980 MBND=MBNDC
3990 LBND=LBNDC
4000 RETURN
4010 MBND=MBNDD
4020 LBND=LBNDD
4030 RETURN
4040 MBND=MBNDE
4050 LBND=LBNDE
4060 RETURN
4070 SV1$=SS$
4080 RETURN
4090 SV2$=SS$
4100 RETURN
4110 SV3$=SS$
4120 RETURN
4130 SV4$=SS$
4140 RETURN
4150 SV5$=SS$
4160 RETURN
4170 SV6$=SS$
4180 RETURN
4190 OPEN "I",#1,"tdata"
4200 INPUT#1,SV1$,SV2$,SV3$,SV4$,SV5$,SV6$
4210 CLOSE#1
4220 LOCATE 5,8:PRINT"File of saved programs:"
4230 LOCATE 8,8:PRINT"1. "SV1$
4240 LOCATE 10,8:PRINT"2. "SV2$
4250 LOCATE 12,8:PRINT"3. "SV3$
4260 LOCATE 14,8:PRINT"4. "SV4$
4270 LOCATE 16,8:PRINT"5. "SV5$
4280 LOCATE 18,8:PRINT"6. "SV6$
4290 LOCATE 21,8,1:PRINT"Which file do you want? ";
4300 E$=INPUT$(1)
4310 IF E$=CHR$(27) GOTO 4600
4320 IF E$<"1" OR E$>"6" GOTO 4300
4330 PRINT E$
4340 S$="SAV"+E$
4350 RETURN
4360 TYP$="1121211112" 'grade 1
4370 BNDA=9:BNDB=9:BNDC=10:BNDD=9:BNDE=99
4380 RETURN
4390 TYP$="1221113112" 'grade 2
4400 BNDA=99:BNDB=12:BNDC=18:BNDD=5:BNDE=999
4410 RETURN
4420 TYP$="1324311432" 'grade 3
4430 BNDA=999:BNDB=9:BNDC=5:BNDD=99:BNDE=999
4440 RETURN
4450 TYP$="1321421232" 'grade 4
4460 BNDA=9999:BNDB=99:BNDC=999:BNDD=12:BNDE=12
4470 RETURN
4480 TYP$="1421413243" 'grade 5
4490 BNDA=999:BNDB=99:BNDC=18:BNDD=18:BNDE=18
4500 RETURN
4510 TYP$="1321414242" 'grade 6
4520 BNDA=9999:BNDB=999:BNDC=24:BNDD=24:BNDE=24
4530 RETURN
4540 LOCATE 17,1,0
4550 FOR I=1 TO 7
4560 PRINT STRING$(40,CHR$(32));
4570 NEXT I
4580 PRINT STRING$(39,CHR$(32));
4590 RETURN
4600 CLS
4610 LOCATE 10,8:PRINT"What do you want to do?"
4620 LOCATE 13,8:PRINT"1. Correct your changes"
4630 LOCATE 15,8,0:PRINT"2. Return to the menu"
4640 E$=INPUT$(1)
4650 IF E$<"1" OR E$>"2" GOTO 4640
4660 IF E$="1" GOTO 250
4670 CLS
4680 LOCATE 13,11,0:PRINT"One moment, please!"
4690 CHAIN "A:tutor"