YaleNew Haven Teachers Institute  Home 
by
Geoffrey P. Smith
This unit contains three computer programs which can be used by any teacher interested in introducing the computer to a classroom. The programs are mathrelated, but they could be used in any type of classroom, because the objectives of this unit are to expose students to the process of computer use and to make students familiar with the hardware. The purpose does not include teaching programming or technical information.
In each case, the teacher loads the program from a cassette tape ahead of time, and the students only need to type appropriate information in response to directions given on the video screen. The machine used is the TRS80 Model I, Level II, although the programs will also work on a TRS80 Model III. The cassette is available from the Yale Institute office. A sample run of each program is listed here, plus a listing of the first program, for reasons given in Part I, below. Listings of the other two programs can be made from the tape, or can be obtained from the author.
The most appropriate audience is students in grades 58, although the program could be used with either younger or older students. The program is intended to be studentproof, i.e., all kinds of possible student errors are anticipated and the computer will respond with helpful comments or suggestions.
In addition to the general objectives described in the introduction, this program was written with the thought that some students might want to see the program itself. Almost every allowable Radio Shack BASIC Level II command has been included in this program, and it is liberally sprinkled with “remarks” to make each step in the logic clear. Thus an interested student could look at particular parts of the program (or the whole thing, but that’s a lot), to see how one person has used different commands to solve a particular kind of problem. For this reason, a listing of this program is included, after the sample run which follows. Entries made by the student or teacher are shown in lowercase type and underlined.
run
____(clear screen)
HELLO. MY NAME IS SAM.
I CAN HELP YOU DO ALL KINDS OF
ARITHMETIC PROBLEMS.
IF YOU HAVE USED ME BEFORE,
YOU MAY WANT TO SKIP THE
DETAILED INSTRUCTIONS. HOWEVER,
HERE IS ONE RULE I WILL SAY NOW:
____ALWAYS HIT THE ‘ENTER’ KEY
____(THAT’S THE WHITE KEY)
____WHEN YOU HAVE FINISHED
____TYPING AN ANSWER.
PRESS ‘ENTER’ NOW TO CONTINUE?
____(clear screen)
FIRST, LET’S GET ACQUAINTED.
I’VE TOLD YOU MY NAME IS SAM.
WOULD YOU PLEASE
TYPE IN YOUR NAME? geoff
IT IS A PLEASURE TO MEET YOU,
GEOFF.
I WILL DO MANY ARITHMETIC
PROBLEMS FOR YOU AS YOU
LEARN HOW TO USE ME.
PRESS ‘ENTER’ TO CONTINUE?
____(clear screen)
NOW, DOWN TO BUSINESS, GEOFF
DO YOU WANT THE DETAILED
INSTRUCTIONS? yes
____(clear screen)
THERE ARE JUST THREE RULES YOU
NEED TO REMEMBER FOR NOW.
1. ALWAYS HIT THE ‘ENTER’ KEY
____WHEN YOU HAVE FINISHED
____TYPING THE NUMBERS OR WORDS
____YOU WANT TO TELL ME.
____(clear screen)
2. HIT THE ‘BREAK’ KEY IF YOU
____WANT TO STOP FOR THE DAY
____OR IF I START TO ACT CRAZY.
____(ME? CRAZY? HO! HO! HO!)
____(clear screen)
3. USE THE ‘BACK ARROW’ KEY
IF YOU WANT TO ERASE
SOMETHING YOU HAVE TYPED.
(THAT’S THE KEY ON THE RIGHT
SIDE OF THE BOARD WITH THE
ARROW POINTING TO THE LEFT)
DO YOU THINK YOU CAN
REMEMBER THESE RULES, NOW? yes
____(clear screen)
WOULD YOU LIKE TO DO:
____1. ADDITION
____2. SUBTRACTION
____3. MULTIPLICATION
____4. DIVISION
WHICH KIND OF PROBLEM (NUMBER 1, 2, 3, OR 4) DO YOU WANT TO TRY? 1
____(clear screen)
ADDITION IT IS, GEOFF.
TYPE IN THE TWO NUMBERS YOU
WANT ADDED, SEPARATED BY A
COMMA.
I WILL SHOW YOU WHAT I MEAN:
____(clear screen)
********************************
* EXPLANATION FOR  * 
* TYPING IN NUMBERS  * 
IF YOU WANT TO HAVE ME
(FOR EXAMPLE)
USE THE NUMBERS SIX AND THREE
THEN TYPE: 6,3
PRESS ‘ENTER’ TO CONTINUE?
DO NOT USE COMMAS IN WRITING LARGE NUMBERS.
____(clear screen)
IF YOU WANT TO HAVE ME
(FOR ANOTHER EXAMPLE)
USE THE NUMBERS TWENTY THOUSAND
AND THIRTY THOUSAND,
THEN TYPE: 20000,30000
(NOTE JUST ONE COMMA  BETWEEN THE NUMBERS) 
THE EXTRA COMMAS WILL JUST
CONFUSE ME. OKAY?
PRESS ‘ENTER’ TO CONTINUE?
WHAT ARE THE NUMBERS? 54,32
____(clear screen)
54 + 32 = 86
WANT TO TRY ANOTHER ADDITION
PROBLEM? no
WANT TO TRY ANOTHER KIND OF
PROBLEM? yes
____(clear screen)
WOULD YOU LIKE TO DO:
____1. ADDITION
____2. SUBTRACTION
____3. MULTIPLICATION
____4. DIVISION
WHICH KIND OF PROBLEM
(NUMBER 1, 2, 3, OR 4) DO
YOU WANT TO TRY? 4
____(clear screen)
YOU REALLY WANT ME TO WORK, DON’T YOU, GEOFF? DIVISION IS HARD, BUT I’LL SHOW YOU HOW FAST IT CAN BE DONE!
TYPE THE TWO NUMBERS YOU WANT DIVIDED, SEPARATED BY A COMMA.
WHAT ARE THE NUMBERS? 24,6
____(clear screen)
24 / 6 = 4
THAT WASN’T SO HARD, GEOFF!
WANT TO SEE ME DO ANY MORE
DIVISION PROBLEMS? yes
WHAT ARE THE NUMBERS? 24,7
____(clear screen)
DON’T WORRY, I’LL DO THAT PROBLEM, GEOFF. I’M NOT STALLING  BUT FIRST YOU HAVE TO MAKE A DECISION ABOUT THE REMAINDER.
____(YES, YOU GAVE ME
____A PROBLEM THAT HAS
____A REMAINDER.)
I CAN DO REMAINDERS THREE WAYS.
PRESS ‘ENTER’ FOR EXPLANATION
OF THREE WAYS?
____(clear screen)
DO YOU WANT THE REMAINDER AS
1. A WHOLE NUMBER
LIKE: 6/4 = 1 R 2
2. A DECIMAL FRACTION
LIKE: 6/4 = 1.5
3. A COMMON FRACTION
____IN SIMPLEST FORM
LIKE: 6/4 = 1 1/2
TYPE THE NUMBER FOR THE WAY YOU
WANT THE REMAINDER EXPRESSED.
WHICH? 1
____(clear screen)
____24 / 7 = 3 R 3
SEE, I TOLD YOU I COULD DO IT.
WANT TO SEE ME DO ANY MORE
DIVISION PROBLEMS? no
WANT TO TRY ANOTHER KIND OF
PROBLEM? no
WELL, I’M READY NOW TO MEET SOMEONE ELSE.
SO, GOODBYE, GEOFF,
WE CAN WORK AGAIN ON
ANOTHER DAY. LET A NEW PERSON HAVE A TURN FOR AWHILE.
NEXT .. . .
FIRST, LET’S GET ACQUAINTED.
I’VE TOLD YOU MY NAME IS SAM.
WOULD YOU PLEASE
TYPE IN YOUR NAME?
BREAK IN 90
READY
list
(listing begins on  next page) 
 5 REM  INTRODUCTORY PROGRAM 
 10 REM  SAM, THE COMPUTER, CAN HELP YOU DO ARITHMETIC.
 20 REM  STRING VARIABLES USED IN THIS PROGRAM:
 25 DEFSTR N,R
 30 ON ERROR GOTO 8000
 35 ST=O: T=1
 36 REM  ‘ST’ WILL COUNT THE STUDENTS USING THE PROGRAM
 37 REM  ‘T’ IS USED TO LOCATE WHERE YOU ARE IN THE PROGRAM
 38 REM (USEFUL FOR ‘RETURN’ AFTER ERROR SUBROUTINE)
 39 CLS: PRINT CHR$(23)
 40 PRINT “HELLO. MY NAME IS SAM.”: PRINT
 45 PRINT “I CAN HELP YOU DO ALL KINDS OF”
 46 PRINT “ARITHMETIC PROBLEMS.”
 47 FOR I=1 TO 2000: NEXT I: PRINT
 50 PRINT “IF YOU HAVE USED ME BEFORE,”
 51 PRINT “YOU MAY WANT TO SKIP THE”
 55 PRINT “DETAILED INSTRUCTIONS. HOWEVER,”
 60 PRINT “HERE IS ONE RULE I WILL SAY NOW:”
 65 PRINT: PRINT TAB(5) “ALWAYS HIT THE ‘ENTER’ KEY”
 70 PRINT TAB(5) “(THAT’S THE WHITE KEY3”
 75 PRINT TAB(5) “WHEN YOU HAVE FINISHED”
 76 PRINT TAB(5) “TYPING AN ANSWER.”
 78 PRINT: INPUT “PRESS ‘ENTER’ NOW TO CONTINUE”;N1
 80 REM  MUTUAL INTRODUCTION FOLLOWS:
 82 CLS: PRINT CHR$(23): T=2
 84 PRINT “FIRST, LET’S GET ACQUAINTED.”
 86 PRINT “I’VE TOLD YOU MY NAME IS SAM.”
 88 PRINT “WOULD YOU PLEASE”
 90 INPUT “TYPE IN YOUR NAME”;NM
 92 IF NM=”YES” THEN 90
 94 IF NM=”NO” THEN 86
 96 PRINT “IT IS A PLEASURE TO MEET YOU,”
 98 PRINT NM;”.”: IF NM=”SAM” PRINT “ WHAT A GREAT NAME!”
 100 ST=ST+1: REM  COUNTING THE STUDENTS USING SAM
 102 PRINT: PRINT
 104 PRINT “I WILL DO MANY ARITHMETIC”
 106 PRINT “PROBLEMS FOR YOU AS YOU”
 108 PRINT “LEARN HOW TO USE ME.”
 110 PRINT: PRINT: INPUT “PRESS ‘ENTER’ TO CONTINUE”;N2
 112 CLS: PRINT CHR$(23): T=3
 114 PRINT “NOW, DOWN TO BUSINESS, “;NM
 116 PRINT “DO YOU WANT THE DETAILED”
 118 INPUT “INSTRUCTIONS”;R1
 120 IF R1=”YES” THEN 200
 122 REM  DETAILED INSTRUCTIONS FOLLOW LINE 200
 124 IF R1=”NO” THEN 395
 126 PRINT “TYPE YES OR NO, PLEASE.”
 128 GOTO 116
 200 REM  DETAILED INSTRUCTIONS:
 205 CLS: PRINT CHR$(23): LV=1
 206 REM  ‘LV’ IS THE STUDENT LEVEL. ‘1’ MEANS BEGINNER
 207 REM (BECAUSE STUDENT REQUESTED INSTRUCTIONS)
 210 PRINT “THERE ARE JUST THREE RULES YOU”
 211 PRINT “NEED TO REMEMBER FOR NOW.”
 215 PRINT 320, “ “
 220 PRINT “1. ALWAYS HIT THE ‘ENTER’ KEY”
 221 PRINT “ WHEN YOU HAVE FINISHED”
 225 PRINT “ TYPING THE NUMBERS OR WORDS”
 230 PRINT “ YOU WANT TO TELL ME.”
 231 FOR I=1 TO 3000: NEXT I
 232 IF LV=2 GOTO 245
 240 PRINT 320, “ “
 245 PRINT “2. HIT THE ‘BREAK’ KEY IF YOU”
 246 PRINT “ WANT TO STOP FOR THE DAY”
 247 PRINT “ OR IF I START TO ACT CRAZY.”
 248 IF LV=2 GOTO 250
 249 PRINT “ (ME? CRAZY? HO! HO! HO!)”
 250 FOR I=1 TO 3000: NEXT I
 251 IF LV=2 GOTO 255
 253 PRINT 320, “ “
 255 PRINT “3. USE THE ‘BACK ARROW’ KEY”
 256 PRINT “ IF YOU WANT TO ERASE”
 257 PRINT “ SOMETHING YOU HAVE TYPED.”: IF LV=2 THEN 261
 258 PRINT “ (THAT’S THE KEY ON THE RIGHT”
 259 PRINT “ SIDE OF THE BOARD WITH THE”
 260 PRINT “ ARROW POINTING TO THE LEFT)”
 261 FOR I=1 TO 3000: NEXT I
 262 PRINT: PRINT: T=4
 263 PRINT “DO YOU THINK YOU CAN”
 264 INPUT “REMEMBER THESE RULES, NOW”;R2
 265 IF R2=”YES” THEN 397
 270 IF R2=”NO” THEN 280
 275 PRINT “TYPE YES OR NO, PLEASE.”: GOTO 263
 280 LV=2: CLS: PRINT CHR$(23): PRINT “HERE THEY ARE AGAIN:”
 282 GOTO 220
 285 REM  ‘LEVEL 2, BECAUSE THE STUDENT IS REVIEWING THE RULES
 395 LV=3
 396 REM  ‘LEVEL 3’ BECAUSE THE STUDENT SKIPPED INSTRUCTIONS
 397 PR=0
 398 REM  ‘PR’ WILL COUNT THE NUMBER OF PROBLEMS DONE
 399 REM (MAXIMUM OF SIX PER STUDENT)
 400 REM  CHOICE OF OPERATIONS FOLLOWS:
 410 CLS: PRINT CHR$(23): PRINT “WOULD YOU LIKE TO DO:”
 420 PRINT TAB(5) “1. ADDITION”
 430 PRINT TAB(5) “2. SUBTRACTION”
 440 PRINT TAB(5) “3. MULTIPLICATION”
 450 PRINT TAB(5) “4. DIVISION”
 460 PRINT: PRINT: T=5
 470 PRINT “WHICH KIND OF PROBLEM”
 471 PRINT “(NUMBER 1, 2, 3, OR 4) DO”
 475 INPUT “YOU WANT TO TRY”;C1
 480 ON C1 GOTO 500, 600, 700, 800
 490 PRINT “PERHAPS YOU MISUNDERSTOOD.”
 495 PRINT “TYPE ONLY THE NUMBER 1, 2,”
 496 PRINT “3, OR 4.”: GOTO 470
 500 REM  ADDITION PROBLEMS
 510 CLS: PRINT CHR$(23): PRINT “ADDITION IT IS, “;NM;”.”
 520 PRINT “TYPE IN THE TWO NUMBERS YOU”
 521 PRINT “WANT ADDED, SEPARATED BY A”
 522 PRINT “COMMA.”
 530 IF LV=1 OR LV=2 GOSUB 9000
 535 PRINT: INPUT “WHAT ARE THE NUMBERS”;A1,A2
 540 CLS: PRINT CHR$(23)
 545 PRINT 260, A1;” + “;A2;” = “;A1+A2
 550 PR=PR+1
 555 IF PR>5 GOTO 1000
 560 PRINT: PRINT: PRINT: T=6
 565 PRINT “WANT TO TRY ANOTHER ADDITION”
 566 INPUT “PROBLEM”;R3
 570 V=0: REM  ‘V’ DEFINED BY AND FOR SUBROUTINE 9100
 575 IF R3=”YES” THEN 535
 580 IF R3=”NO” GOSUB 9100
 585 ON V+1 GOTO 590, 400, 1000
 590 INPUT “TYPE YES OR NO, PLEASE”;R3
 595 GOTO 575
 600 REM  SUBTRACTION PROBLEMS
 605 CLS: PRINT CHR$(23)
 606 PRINT “OKAY, COMING RIGHT UP, “;NM;”.”
 607 PRINT TAB(5) “   SUBTRACTION   ”
 610 PRINT: PRINT “TYPE IN THE TWO NUMBERS YOU”
 611 PRINT “WANT SUBTRACTED, SEPARATED”
 615 PRINT “BY A COMMA.”
 620 IF LV=1 GOSUB 9000
 625 PRINT: INPUT “WHAT ARE THE NUMBERS”;M,S
 630 IF M>=S THEN 642
 631 PRINT “DID YOU MEAN TO HAVE THE LARGER”
 632 PRINT “NUMBER SUBTRACTED FROM THE”
 633 INPUT “SMALLER NUMBER”;R4
 635 IF R4=”YES” THEN 642
 637 PRINT “I’LL SWITCH THEM AROUND THE”
 638 PRINT “OTHER WAY, “;NM;”.”
 639 H=M: M=S: S=H
 640 FOR I=1 TO 1000: NEXT I
 642 CLS: PRINT CHR$(23)
 645 PRINT 260, M;”  “;S;” = “;MS
 650 PR=PR+1
 655 IF PR>5 THEN 1000
 660 PRINT: PRINT: PRINT: PRINT
 665 PRINT “WANT TO TRY ANOTHER”
 667 INPUT “SUBTRACTION PROBLEM”;R5
 670 V=0: T=7
 675 IF R5=”YES” THEN 625
 680 IF R5=”NO” GOSUB 9100
 685 ON V+1 GOTO 690, 400, 1000
 690 INPUT “TYPE YES OR NO, PLEASE”;R5
 695 GOTO 675
 700 REM  MULTIPLICATION PROBLEMS
 705 CLS: PRINT CHR$(23)
 706 PRINT “OKAY, “;NM;”,”
 707 PRINT “WE’LL DO MULTIPLICATION.”
 710 PRINT “TYPE IN THE TWO NUMBERS YOU”
 711 PRINT “WANT MULTIPLIED, SEPARATED BY”
 715 PRINT “A COMMA.”
 720 IF LV=2 GOSUB 9000
 725 PRINT: INPUT “WHAT ARE THE NUMBERS”;F1 ,F2
 735 CLS: PRINT CHR$(23)
 745 PRINT 260, F1;” X “;F2;” = “;F1*F2
 750 PR=PR+1
 755 IF PR>5 GOTO 1000
 760 PRINT: PRINT: PRINT: PRINT
 765 PRINT “WANT TO HAVE ME DO MORE”
 766 INPUT “MULTIPLICATION”;R6
 770 V=0: T=8
 775 IF R6=”YES” THEN 725
 780 IF R6=”NO” GOSUB 9100
 785 ON V+1 GOTO 790, 400, 1000
 790 INPUT “TYPE YES OR NO, PLEASE”;R6
 795 GOTO 775
 800 REM  DIVISION PROBLEMS
 805 CLS: PRINT CHR$(23)
 806 PRINT “YOU REALLY WANT ME TO WORK,”
 807 PRINT “DON’T YOU, “;NM;”? DIVISION”
 810 PRINT “IS HARD, BUT I’LL SHOW YOU”
 812 PRINT “HOW FAST IT CAN BE DONE!”
 815 PRINT: PRINT “TYPE THE TWO NUMBERS YOU”
 816 PRINT “WANT DIVIDED, SEPARATED BY”
 820 PRINT “A COMMA.”: T=9: DP=1: REM  ‘DP’ COUNTS IN 9200 SUBR
 825 IF LV=3 GOTO 850
 830 PRINT “BE SURE TO PUT THE NUMBER YOU”
 831 PRINT “WANT DIVIDED FIRST AND THE”
 832 PRINT “NUMBER YOU WANT TO DIVIDE BY”
 833 PRINT “SECOND.”
 834 FOR I=1 TO 4000: NEXT I
 835 IF LV=1 GOTO 848
 836 CLS: PRINT CHR$(23)
 837 PRINT “FOR EXAMPLE, IF YOU TYPE: 6,3”
 838 PRINT TAB(5) “I WILL SAY: 6/3 = 2”
 840 PRINT “HOWEVER, IF YOU TYPE: 3,6”
 842 PRINT TAB(5) “I WILL SAY: 3/6 = 1/2”
 844 PRINT “SO YOU SEE, “;NM;,”
 845 PRINT “IT MAKES A DIFFERENCE”
 846 PRINT “WHICH ORDER YOU USE.”
 847 FOR I=1 TO 3000: NEXT I
 848 LV=3: RKM  ‘LEVEL 3’ TO AVOID REPEATING INSTRUCTIONS
 849 PRINT: PRINT “NOW, BE CAREFUL ”
 850 PRINT: INPUT “WHAT ARE THE NUMBERS”;DIV,DVI
 852 IF DVI>0 THEN 856
 854 PRINT “YOU CAN NOT DIVIDE BY ZERO.”
 855 PRINT “TRY AGAIN.”: GOTO 849
 856 Z=DIV/DVI
 858 IF Z=INT(Z) THEN 900
 859 IF DIV>INT(DIV) OR DVI>INT(DVI) THEN 900
 860 GOSUB 9200
 865 ON C3 GOTO 870, 900, 930
 870 Q=INT(Z): LF=DIV  Q*DVI
 875 CLS: PRINT CHR$(23)
 880 PRINT 260, DIV;”/”;DVI;” = “;Q;” R “;LF
 885 PRINT: PRINT: PRINT
 890 PRINT “SEE, I TOLD YOU I COULD DO IT.”
 895 GOTO 968
 900 CLS: PRINT CHR$(23)
 905 PRINT 260, DIV;”/”;DVI;” = “;Z
 910 PRINT: PRINT: PRINT
 915 PRINT “THAT WASN’T SO HARD, “;NM:”!”
 920 GOTO 968
 930 CLS: PRINT CHR$(23)
 932 PRINT “OKAY, HOLD ON. I’M WORKING ON”
 934 PRINT “FINDING THE SIMPLEST FRACTION.”
 936 V2=ABS(DIV): D2=ABS(DVI)
 938 W=SGN(DIV*DVI)
 940 REM  ‘W’ INDICATES SIGN OF ANSWER
 942 Q=INT(V2/D2): LF=V2Q*D2
 944 L2=LF: C2=0
 950 FOR F=L2 TO 2 STEP l
 952 IF C2=1 THEN 960
 954 IF L2/F>INT(L2/F) THEN 960
 956 IF D2/F>INT(D2/F) THEN 960
 958 L2=L2/F: D2=D2/F: C2=l
 960 NEXT F
 961 IF LF26 THEN 966
 962 PRINT “WHEW! THAT WAS REALLY HARD!”
 963 PRINT “BUT I GOT IT AT LAST,”
 964 PRINT “AND THE ANSWER IS . . .”
 966 PRINT: PRINT “ “;DIV;”/”;DVI;” = “;W*Q;” “;L2;”/”;D2
 968 PR=PR+1
 970 IF PR>5 THEN 1000
 972 PRINT: PRINT: PRINT
 974 PRINT “WANT TO SEE ME DO ANY MORE”
 975 INPUT “DIVISION PROBLEMS”;R7
 976 V=0: T=10
 978 IF R7=”YES” THEN 850
 980 IF R7=”NO” GOSUB 9100
 985 ON V+1 GOTO 990, 400, 1000
 990 INPUT “TYPE YES OR NO, PLEASE”;R7
 995 GOTO 978
 1000 REM  CHANGING STUDENTS
 1010 IF ST>5 THEN 1100
 1012 REM  MAXIMUM OF SIX STUDENTS ALLOWED
 1020 PRINT: PRINT “WELL, I’M READY NOW TO MEET”
 1022 PRINT “SOMEONE ELSE.”: FOR I=1 TO 1000: NEXT I
 1025 PRINT “SO, GOODBYE, “;NM;”,”
 1030 PRINT “WE CAN WORK AGAIN ON”
 1040 PRINT “ANOTHER DAY. LET A NEW PERSON”
 1041 PRINT “HAVE A TURN FOR AWHILE.”
 1050 PRINT
 1060 PRINT “NEXT . . . .”
 1070 GOTO 84
 1100 REM  STOPPING FOR THE DAY
 1105 CLS: PRINT CHR$(23)
 1110 PRINT “I’M TIRED NOW, AND I WOULD”
 1111 PRINT “LIKE TO STOP WORK.”
 1120 PRINT “MAYBE AT ANOTHER TIME WE COULD”
 1121 PRINT “WORK TOGETHER AGAIN.”
 1122 PRINT: PRINT “BYEBYE, “;NM;”.”
 1123 PRINT “SAM IS NOT NOW”
 1130 GOTO 9999
 1998 END
 1999 REM  ALL SUBROUTINES FOLLOW 
 8000 REM  ERROR MESSAGE SUBROUTINE
 8010 CLS: PRINT CHR$(23)
 8020 PRINT “YOU GOOFED!!!”
 8030 PRINT “I DON’T KNOW HOW IT HAPPENED”
 8035 PRINT “BUT SOMETHING YOU ARE DOING”
 8040 PRINT “IS CONFUSING ME.”
 8050 PRINT
 8060 PRINT “GET HELP FROM YOUR TEACHER”
 8065 PRINT “AND I WILL TRY TO GET YOU BACK”
 8066 PRINT “WHERE YOU WERE BEFORE.”
 8067 FOR I=1 TO 3000: NEXT I
 8070 ON T GOTO 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088
 8071 ON T8 GOTO 8089, 8090, 8091, 8092
 8072 T=1
 8081 RESUME 40
 8082 RESUME 90
 8083 RESUME 116
 8084 RESUME 263
 8085 RESUME 410
 8086 RESUME 565
 8087 RESUME 665
 8088 RESUME 765
 8089 RESUME 815
 8090 RESUME 974
 8091 RESUME 9120
 8092 RESUME 9265
 8099 RESUME
 9000 REM  EXPLANATION FOR TYPING IN NUMBERS SUBROUTINE
 9010 LV=3
 9015 REM  LEVEL 3 SO THIS WILL NOT BE REPEATED FOR ANY STUDENT
 9016 PRINT “I WILL SHOW YOU WHAT I MEAN:”
 9017 FOR I=1 TO 3000: NEXT I
 9020 CLS: PRINT CHR$(23)
 9025 PRINT “*******************************”
 9026 PRINT “* EXPLANATION FOR *”
 9027 PRINT “* TYPING IN NUMBERS *”
 9028 PRINT “*******************************”
 9030 PRINT 384, “IF YOU WANT TO HAVE ME”
 9032 PRINT “(FOR EXAMPLE)”
 9035 PRINT “USE THE NUMBERS SIX AND THREE”
 9040 PRINT “THEN TYPE: 6,3”
 9045 PRINT: INPUT “PRESS ‘ENTER’ TO CONTINUE”;N3
 9050 PRINT “DO NOT USE COMMAS IN WRITING”
 9051 PRINT “LARGE NUMBERS.”
 9052 FOR I=1 TO 2000: NEXT I
 9055 PRINT 448, “(FOR ANOTHER EXAMPLE)”
 9056 PRINT “USE THE NUMBERS TWENTY THOUSAND”
 9057 PRINT “AND THIRTY THOUSAND,”
 9060 PRINT “THEN TYPE: 20000,30000”
 9065 PRINT “ (NOTE JUST ONE COMMA”
 9066 PRINT “BETWEEN THE NUMBERS)”
 9070 PRINT “IF YOU TYPE:20,000, 30,000”
 9075 PRINT “THE EXTRA COMMAS WILL JUST”
 9076 PRINT “CONFUSE ME. OKAY?”
 9080 INPUT “PRESS ‘ENTER’ TO CONTINUE”;N4
 9099 RETURN
 9100 REM  CHANGING TYPE OF PROBLEM SUBROUTINE
 9110 V=0
 9115 REM  ‘V’ WILL SPECIFY WHICH BRANCH THE PROGRAM FOLLOWS
 9116 T=11
 9120 PRINT “WANT TO TRY ANOTHER KIND OF”
 9121 INPUT “PROBLEM”;R8
 9130 IF R8=”YES” THEN V=1
 9140 IF R8=”NO” THEN V=2
 9150 ON V+1 GOTO 9160, 9199, 9199
 9160 INPUT “TYPE YES OR NO, PLEASE”;R8
 9170 GOTO 9130
 9199 RETURN
 9200 REM  DIVISION REMAINDER SUBROUTINE
 9202 IF DP>1 THEN 9233
 9204 CLS: PRINT CHR$(23)
 9206 PRINT “DON’T WORRY, I’LL DO THAT”
 9210 PRINT “PROBLEM, “;NM;”. I’M NOT”
 9215 PRINT “STALLING  BUT FIRST YOU”
 9216 PRINT “HAVE TO MAKE A DECISION ABOUT”
 9220 PRINT “THE REMAINDER.”: PRINT
 9221 PRINT TAB(5) “(YES, YOU GAVE ME”
 9222 PRINT TAB(6) “A PROBLEM THAT HAS”
 9225 PRINT TAB(6) “A REMINDER.)”
 9230 PRINT: PRINT “I CAN DO REMAINDERS THREE WAYS.”
 9231 PRINT: PRINT “PRESS ‘ENTER’ FOR EXPLANATION”
 9232 INPUT “OF THREE WAYS”;N5
 9233 CLS: PRINT CHR$(23): IF DP>2 THEN 9265
 9235 PRINT “DO YOU WANT THE REMAINDER AS:”
 9236 PRINT “1. A WHOLE NUMBER”
 9237 PRINT TAB(6) “LIKE: 6/4 = 1 R 2”
 9240 PRINT “2. A DECIMAL FRACTION”
 9245 PRINT TAB(6) “LIKE: 6/4 = 1.5”
 9250 PRINT “3. A COMMON FRACTION”
 9251 PRINT “ IN SIMPLEST FORM”
 9255 PRINT TAB(6) “LIKE: 6/4 = 1 1/2
 9260 T=12
 9265 PRINT “TYPE THE NUMBER FOR THE WAY YOU”
 9266 PRINT “WANT THE REMAINDER EXPRESSED.”
 9267 IF DP3 THEN 9271
 9268 PRINT “1  WHOLE NUMBER”
 9269 PRINT “2  DECIMAL”
 9270 PRINT “3  FRACTION”
 9271 INPUT “WHICH”;C3
 9275 IF C3=1 OR C3=2 OR C3=3 THEN 9290
 9280 PRINT “PERHAPS YOU MISUNDERSTOOD.”
 9285 PRINT “TYPE ONLY THE NUMBERS 1, 2, OR 3.”
 9286 GOTO 9271
 9290 IF C3=1 AND (DIV0 OR DVIO) THEN 9291 ELSE 9297
 9291 PRINT “SORRY, “;NM;”;.I CANNOT DO”
 9292 PRINT “WHOLE NUMBER REMAINDERS ON”
 9293 PRINT “PROBLEMS INVOLVING NEGATIVE”.
 9294 PRINT “NUMBERS. (I GET CONFUSED.)”
 9296 PRINT “CHOOSE 2 0R 3.”: GOTO 9271
 9297 DP=DP+1
 9298 REM  ‘DP’ WILL COUNT THE TIMES THESE DIRECTIONS ARE GIVEN
 9299 RETURN
 9999 END
Students can pick the kind of problem they want to work with (whole numbers, fractions, decimals, or percents), the level of difficulty, and the number of problems (up to 10) that they want to do. These choices could also be made by the teacher, as a practice drill for the student. After each student finishes, his/her raw score and percentage score are printed out, with an appropriate comment. The student then can do more problems at the same level, switch to a different level, do a different kind of problem, or stop.
The program also has the capability of allowing students to estimate rather than give precise answers. Depending on the level of difficulty, answers within 10%, 7%, or 4% of the correct response are accepted. In keeping score a penalty of point is subtracted for each wrong guess. Students are given three chances on each problem.
A sample run follows. Entries made by the student or teacher are shown in lowercase type and underlined.
run
____(clear screen)
HELLO
WOULD YOU PLEASE
TYPE IN YOUR NAME? vicki
HOW DO YOU DO, VICKI.
DO YOU WANT TO WORK WITH:
____1. WHOLE NUMBERS
____2. FRACTIONS
____3. DECIMALS
____4. PERCENTS
____5. WHATEVER I CHOOSE FOR YOU
TYPE 1, 2, 3, 4, OR 5? 5
____(clear screen)
DECIMALS
NOTE  IT IS OKAY TO ESTIMATE
YOUR ANSWER ON ANY DECIMAL
PROBLEM THAT YOU TRY TO DO.
OKAY, VICKI, NOW
DO YOU WANT TO DO:
____1. ADDITION
____2. SUBTRACTION
____3. MULTIPLICATION
____4. DIVISION
____5. WHATEVER I CHOOSE FOR YOU
TYPE 1, 2, 3, 4, OR 5? 2
 SUBTRACT DECIMALS 
CHOOSE THE LEVEL OF DIFFICULTY,
VICKI:
____1. BEGINNER
____2. MEDIUM
____3. EXPERT
WHICH (TYPE 1, 2, OR 3)? 2
HOW MANY PROBLEMS (1 TO 10)
DO YOU WANT TO DO? 4
31.3  6.32 = ? 25.02
CLOSE ENOUGH
THE EXACT ANSWER IS 24.98
16.54  .09 =? 16.45
CORRECT
29.76  9.92 =? 20
CLOSE ENOUGH
THE EXACT ANSWER IS 19.84
21.96  8.76 =? 30.72
NO, VICKI. TRY AGAIN.
? 29.2
NO, VICKI. TRY AGAIN.
? 27.20
SORRY, VICKI,
THE CORRECT ANSWER IS 13.2
____(clear screen)
VICKI, YOUR SCORE IS
2.25 OUT OF 4, OR 56%
YOU GOT 1 WRONG
YOU’RE CLOSE TO PASSING,
BUT YOUR SCORE IS STILL NOT
OKAY. KEEP WORKING AT THESE,
VICKI.
____(clear screen)
DO YOU WANT TO:
1. DO THE SAME KIND OF PROBLEM
2. CHANGE THE DIFFICULTY LEVEL
3. DO ANOTHER KIND OF PROBLEM
4. STOP
TYPE 1, 2, 3, OR 4? 3
DO YOU WANT TO WORK WITH:
____1. WHOLE NUMBERS
____2. FRACTIONS
____3. DECIMALS
____4. PERCENTS
____5. WHATEVER I CHOOSE FOR YOU
TYPE 1, 2, 3, 4, OR 5? 2
____(clear screen)
FRACTIONS
OKAY, VICKI, NOW
DO YOU WANT TO DO:
____1. ADDITION
____2. SUBTRACTION
____3. MULTIPLICATION
____4. DIVISION
____5. WHATEVER I CHOOSE FOR YOU
TYPE 1, 2, 3, 4, OR 5? 3
* MULTIPLY FRACTIONS *
CHOOSE THE LEVEL OF DIFFICULTY,
VICKI:
____1. BEGINNER
____2. MEDIUM
____3. EXPERT
WHICH (TYPE 1, 2, OR 3)? 3
HOW MANY PROBLEMS (1 TO 10)
DO YOU WANT TO DO? 5
TYPE NUMERATOR,COMMA,DENOMINATOR
4/6 X 2/8 = ? 8,48
OKAY, BUT NOT IN SIMPLEST FORM.
TRY AGAIN, VICKI.
? 1,6
VERY GOOD
TYPE NUMERATOR,COMMA,DENOMINATOR
7/7 X 6/9 = ? 2,3
VERY GOOD
TYPE NUMERATOR,COMMA,DENOMINATOR
4/10 X 8/7= ? 16,35
VERY GOOD
TYPE NUMERATOR,COMMA,DENOMINATOR
9/4 X 1/6 = ? 3,8
VERY GOOD
TYPE NUMERATOR,COMMA,DENOMINATOR
5/3 X 7/10 = ? 6,7
NO, NOT RIGHT. TRY AGAIN . .
? 35,30
OKAY, BUT NOT IN SIMPLEST FORM.
TRY AGAIN, VICKI.
? 7,6
VERY GOOD
____(clear screen)
VICKI, YOUR SCORE IS
4.25 OUT OF 5, OR 85%
YOU GOT 0 WRONG
VERY NICE JOB.
KEEP IT UP.
____(clear screen)
DO YOU WANT TO:
1. DO THE SAME KIND OF PROBLEM
2. CHANGE THE DIFFICULTY LEVEL
3. DO ANOTHER KIND OF PROBLEM
4. STOP
TYPE 1, 2, 3, OR 4? 4
DOES SOMEONE ELSE WANT A TURN?
TYPE 1 FOR YES, 0 FOR NO? 0
OKAY, THEN, VICKI.
GOODBYE .. .
READY
If the xintercept or the yintercept is greater than 500, the graph will not be drawn, but a message will be printed indicating the approximate location of the line. The program works best when the intercepts are less than five.
A sample run follows. Entries made by the student or teacher are shown in lowercase type and underlined.
run
____(clear screen)
***** CARTESIAN GRAPH *****
DO YOU WANT TO USE  (1) STANDARD FORM:  AX + BY + C 
OR (2) SLOPEINTERCEPT FORM: Y = MX + B 
____(clear screen)
GIVEN AN EQUATION IN SLOPEINTERCEPT FORM:
Y = MX + B
TYPE IN THE VALUES OF M AND B, SEPARATED BY A COMMA.
? 2,10
____(clear screen)
SL= 2
YI= 10
READY
run
____(clear screen)
***** CARTESIAN GRAPH  *****  
DO YOU WANT TO USE (1) STANDARD FORM:  TYPE 1 OR 2? 1  
OR (2) SLOPEINTERCEPT FORM:  Y = MX + B 
____(clear screen)
GIVEN AN EQUATION IN STANDARD FORM:
____AX + BY + C = 0
TYPE IN THE VALUES OF A, B, AND C, SEPARATED BY COMMAS.
? 1,2,3
____(clear screen)
____SL= .5
____YI= 1.5
READY
Booklets:
Ahl, David H. (ed.); Computers in Mathematics: A Sourcebook of Ideas; Creative Computing Press; Morristown, NJ; 1979
 an excellent source for a multitude of computer applications
Rogowski, Stephen J.; Problems for Computer Solution (teacher edition); Creative Computing Press; Morristown, NJ; 1980
 the companion volume to the student edition listed below
Level II BASIC Reference Manual; Radio Shack; Fort Worth, TX; 1979
 a necessity if more than an introduction to computers is planned
Magazines:
The Computing Teacher; International Council for Computers in Education; Eastern Oregon State College; La Grande, OR 97850
 many thoughtprovoking articles on the uses of computers in education
Creative Computing; Creative Computing Press; P.O. Box 789M, Morristown, NJ 07960
 as the name implies, many creative ideas every month
Student Bibliography
Lien, Dr. David A.; Users Manual for Level I Radio Shack TRS 80; Radio Shack; Fort Worth, TX; 1978
 even though the name implies that this is only for Level I BASIC, it is still an excellent introduction to Level II BASIC, so long as the teacher has the Manual listed above
McQuigg, James D. and Alta M. Harness; Flowcharting; Houghton Mifflin Co.; Boston, MA; 1970
 a good introduction to the first step in computer programming, and it does not require any computer use
Rogowski, Stephen J.; Problems for Computer Solution (student edition); Creative Computing Press; Morristown, NJ; 1979
 a wonderful source of computer problems at any level of ability
1. “Intro to Sam”, from Part I of the paper
2. “Test of Skills”, from Part II of the paper
3. “Cartesian Graph”, from Part III of the paper
Contents of 1981 Volume VI  Directory of Volumes  Index  YaleNew Haven Teachers Institute
