A TOUCH OF CLASS (ROOM)…
Here we have another set of programs tied together by a common thread. Both of the following programs were designed for classroom use–and by authors that are in position to make a direct test of the audience response to their programs. Alex Sweitzer is himself a teacher, while Shawn Byrne‘s mother teaches a fourth grade that has five TS1500s operating in their classroom.
There’s an element of mutual good fortune here. Alex and Shawn are lucky, of course, to have such ready access to “market research”. But the youngsters are doubly lucky. Lucky not only to have access to computers, but also to have teachers that can make innovative and effective use of the computers’ potential.
GEOMETRY PLOTTER
This is another program by the winner of the TS1000 section of our contest. Mr. Sweitzer tells us that his program has been “field tested” in his classroom. He also reports that he has one pupil who is turning into a real computer enthusiast as a result of his work with the good ol’ ZX81. More power to you, Alex!
The program is pretty straightforward, and contains its own instructions. In reply to the computer’s prompts, you specify X1 and Y1, X2 and Y2, and which one of eight given symbols will be used for the plot. The computer then plots the straight line (or as close as it can come to a straight line, given the block-graphics limitations of the computer) from X1,Y1 to X2,Y2. If your selection of co-ordinates is not within the allowed range, a humorous error message is given (line 930). Which is fair, because you’ve been told ahead of time what the acceptable limits were.
Editor’s Comments
It’s obvious that the author is a teacher, from the fact that the program describes him as “Mr. Sweitzer” (no first name). He says that the program is being used by students between 8 and 12 years of age. What he didn’t mention is that some of us slightly older people can find it an interesting medium for drawing pictures.
I wasn’t able to make the ERASE function work the way I thought that the instructions said it would. Maybe this is an example of Tom Lehrer’s comment on New Math: “It’s so simple that only a child can do it.”
Similarly, I didn’t find any provision for aborting the program. Sure, we old hands know how to frustrate the computer by INPUTting an unknown quantity, or (if a string INPUT is requested) a STOP, after EDITing out the quotation-mark prompt, but fifth-graders may not know about those devious techniques.
One other refinement that might make the program more educational would be the display of X and Y scales.
But it’s a fun program, for a’ that.
NOTE: the lines in INVERSE print are as follows:
0 (author's name and address) 154, 294, 394 (underline) 240 PLOTTING POINT... 470 PLOTTING POINT... 530 CONNECTING POINTS...WAIT 930 PLEASE FOLLOW DIRECTIONS HUMAN.. 1170 GEOMETRY PLOTTER 1250 DIRECTIONS 1510 USES THESE NUMBERS TO PLOT 1590 USES THESE NUMBERS TO PLOT 1640 ERASE POINT LINES
0 REM [author's name and address in inverse print; address omitted]
10 SLOW
20 LET A=0
30 GOSUB 1160
40 GOSUB 990
50 PRINT AT 21,0;"TYPE X STARTING LOCATION (0-31)"
60 INPUT XSTART
61 LET A=0
64 REM [inverse underline]
70 IF XSTART>31 OR XSTART<0 THEN GOSUB 930
80 IF XSTART>31 OR XSTART<0 THEN GOTO 50
90 GOSUB 970
100 PRINT AT 21,0;"YOU ENTERED:>";XSTART
109 LET PP=20
110 FOR P=1 TO PP
120 IF INKEY$="M" THEN GOTO 50
130 NEXT P
140 PRINT AT 21,0;"TYPE Y STARTING LOCATION (1-21)"
150 INPUT YSTART
154 REM [inverse underline]
160 IF YSTART>21 OR YSTART<1 THEN GOSUB 930
170 GOSUB 970
180 IF YSTART>21 OR YSTART<1 THEN GOTO 140
190 PRINT AT 21,0;"YOU ENTERED:>";YSTART
200 FOR P=1 TO PP
210 IF INKEY$="M" THEN GOTO 140
220 NEXT P
230 GOSUB 970
240 PRINT AT 21,0;"PLOTTING POINT..."
250 PRINT AT 21,20;"(X=";XSTART;"/Y=";YSTART;")"
260 PAUSE 100
270 PRINT AT YSTART-21,XSTART;"▒"
280 PRINT AT 21,0;" TYPE X ENDING LOCATION (0-31) "
290 INPUT XEND
294 REM [inverse underline]
300 IF XEND>31 OR XEND<0 THEN GOSUB 930
310 IF XEND>31 OR XEND<0 THEN GOTO 280
320 GOSUB 970
330 PRINT AT 21,0;"YOU ENTERED:>";XEND
340 FOR P=1 TO PP
350 IF INKEY$="M" THEN GOTO 280
360 NEXT P
370 GOSUB 970
380 PRINT AT 21,0;" TYPE Y ENDING LOCATION (1-21) "
390 INPUT YEND
394 REM [inverse underline]
400 IF YEND>21 OR YEND<1 THEN GOSUB 930
410 IF YEND>21 OR YEND<1 THEN GOTO 380
420 GOSUB 970
430 PRINT AT 21,0;"YOU ENTERED:>";YEND
440 FOR P=1 TO PP
450 IF INKEY$="M" THEN GOTO 380
460 NEXT P
470 PRINT AT 21,0;"PLOTTING POINT..."
480 PRINT AT 21,20;"(X=";XEND;"/Y=";YEND;")"
490 PAUSE 100
500 PRINT AT YEND-21,XEND;"▒"
510 PAUSE 60
520 GOSUB 970
530 PRINT AT 21,0;"CONNECTING POINTS...WAIT"
540 GOSUB 560
550 GOTO 280
560 LET U=XEND-XSTART
570 LET M=ABS (U)
580 LET X1=SGN (U)
590 LET X2=X1
600 LET V=YEND-YSTART
610 LET N=ABS (V)
620 LET Y1=SGN (V)
630 LET Y2=Y1
640 IF M>N THEN GOTO 700
650 LET U=N
660 LET N=M
670 LET M=U
680 LET X2=0
690 GOTO 710
700 LET Y2=0
710 LET S=INT (M/2)
720 FOR I=0 TO M
730 PRINT AT YSTART-21, XSTART;CHR$ (NN);
740 LET S=S+N
750 LET XQ=X2
760 LET YQ=Y2
770 IF S<M THEN GOTO 810
780 LET S=S-M
790 LET XQ=X1
800 LET YQ=Y1
810 LET XSTART=XSTART+XQ
820 LET YSTART=YSTART+YQ
830 NEXT I
840 LET XSTART=XEND
850 LET YSTART=YEND
860 PRINT AT 21,0;"C=CONT./E=ERASE/P=PRINT/R=RUN->";
862 INPUT R$
863 PRINT R$
865 PAUSE 60
870 IF A=1 THEN LET NN=H
875 IF R$="C" THEN RETURN
900 IF R$="E" THEN GOTO 1640
910 IF R$="R" THEN GOTO 40
920 IF R$="P" THEN COPY
923 GOTO 860
930 PRINT AT 21,0;"PLEASE FOLLOW DIRECTIONS HUMAN.."
940 PAUSE 200
950 GOSUB 970
960 RETURN
970 PRINT AT 21,0;" "
980 RETURN
990 CLS
1000 PRINT AT 2,0;"PLEASE ENTER ONE OF THESE CHARACTERS FOR THE PLOTTING SYMBOL."
1010 PRINT ,,"1 ▒","2 *","3 .","4 0","5 +","6 -","7 :","8 ▒"
1020 PRINT ,,,,"ENTER NUMBER NEXT TO SYMBOL."
1030 INPUT RR
1040 IF RR<1 OR RR>8 THEN GOSUB 930
1050 IF RR<1 OR RR>8 THEN GOTO 990
1060 IF RR=1 THEN LET NN=128
1070 IF RR=2 THEN LET NN=23
1080 IF RR=3 THEN LET NN=27
1090 IF RR=4 THEN LET NN=28
1100 IF RR=5 THEN LET NN=21
1110 IF RR=6 THEN LET NN=22
1120 IF RR=7 THEN LET NN=14
1130 IF RR=8 THEN LET NN=8
1140 CLS
1150 RETURN
1160 CLS
1170 PRINT AT 10,0;"GEOMETRY PLOTTER"
1180 PRINT AT 15,6;"BY MR. SWEITZER";AT 17,6;"FEBRUARY 11, 1986"
1190 PRINT AT 19,6;"UPDATED JANUARY 28, 1987"
1200 PRINT AT 21,0;"PRESS <C> TO CONTINUE ..."
1210 IF INKEY$="C" THEN GOTO 1240
1220 PRINT AT 21,0;" "
1230 GOTO 1200
1240 CLS
1250 PRINT "DIRECTIONS"
1260 PRINT ,,"THIS PROGRAM WILL SHOW YOU HOW TO PLOT ON A GRID JUST LIKE IN YOUR MATH BOOK. FIRST I WILL"
1270 PRINT "SHOW YOU THE NUMBERS FOR X(0-31)AND FOR Y(1-21). STUDY THE GRID."
1280 PRINT "NEXT YOU MUST SELECT A SYMBOL TOUSE FOR YOUR PLOTTING(1-8)."
1290 PRINT "AFTER THAT YOU SELECT BOTH X ANDY STARTING LOCATIONS. I WILL"
1300 PRINT "PLOT THESE POINTS FOR YOU. THENI WILL ASK FOR BOTH X AND Y"
1310 PRINT "ENDING POINTS. I WILL CONNECT THOSE TWO POINTS. YOU THEN MAY CONTINUE TO PLOT AND CONNECT"
1320 PRINT "POINTS. NOTE:IF YOU ENTER A WRONG NUMBER YOU MAY PRESS THE"
1330 PRINT "LETTER <M> TO CORRECT YOUR WRONGNUMBER. YOU ARE GIVEN ABOUT"
1340 PRINT AT 21,0;"PRESS <C> TO CONTINUE READING..."
1350 IF INKEY$="C" THEN GOTO 1370
1360 GOTO 1350
1370 CLS
1380 PRINT "ONE TO TWO SECONDS TO PRESS <M> AFTER I SHOW YOU THE NUMBER THAT"
1390 PRINT "YOU ENTERED."
1420 PRINT ,,"IF YOU PLOT AND CONNECT YOUR POINTS YOU CAN ERASE YOUR LINES AND POINTS IF YOU PRESS <E>"
1430 PRINT "INSTEAD OF <C> WHEN ASKED. WHENYOU PRESS <E> YOU MUST ENTER THE"
1440 PRINT "X AND Y VALUES FROM THE PREVIOUSMOVE. THE COMPUTER WILL CONNECTYOUR MISTAKEN POINTS WITH YOUR"
1450 PRINT "PREVIOUS POINTS. THE COMPUTER WILL USE BLANKS WHICH LOOKS LIKEIT IS ERASING. CONTINUE ON AS NORMAL AFTER ERASING LINE."
1460 PRINT AT 21,0;"PRESS <C> TO START PLOTTING..."
1465 PAUSE 4E4
1490 CLS
1500 PRINT "01234567891111111111222222222233 0123456789012345678901"
1510 PRINT AT 4,0;"USES THESE NUMBERS TO PLOT"
1520 PRINT AT 6,10;"(0 TO 31)"
1530 PAUSE 100
1540 FOR U=1 TO 21
1550 PRINT AT 21-U,0;U
1560 IF U>3 THEN FAST
1570 NEXT U
1580 SLOW
1590 PRINT AT 17,2;"USES THESE NUMBERS TO PLOT"
1600 PRINT AT 19,10;"(1 TO 21)"
1610 PRINT AT 21,0;"PRESS <C> TO CONTINUE"
1620 IF INKEY$="C" THEN RUN 40
1630 GOTO 1620
1640 REM ERASE POINT LINES
1650 LET A=1
1660 LET H=NN
1670 LET NN=0
1680 PRINT AT 21,0;" "
1690 PRINT AT 21,0;"USE PREVIOUS <X> AND <Y> VALUES "
1700 PAUSE 200
1710 RETURN
1720 SAVE "PLO▒"
1730 RUN

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.