Yale-New Haven Teachers Institute Home

## The Effective Use of Computers in Applied Mathematics

by
John Crotty and Joseph Cummins

#### To Guide Entry

Our unit deals with the use of the computer in the teaching of fractions. It is an undeniable fact that the learning of how to effectively work with fractions is the biggest obstacle students in an Applied Mathematics course must overcome. It is also recognized that fractions which occur at any level in mathematics always pose a major problem for students. We strongly believe that this unit will make it much easier for most students in Applied Mathematics to learn all aspects of fractional mathematics.

The computer can become a valuable asset in conceptualizing operations involving fractions as well as demonstrating comparison of fractions and the reducing of fractions to lowest terms. By the use of programmed models, this unit attempts to aid the teacher in the teaching of this most troublesome area.

By using programmed graphical models size comparisons are easily made in the ordering of fractions. Common denominators through the use of graphical models are readily apparent in addition and subtraction of fractions. Also the concept of equivalent fractions can be easily generated by means of programmed models. The concept of multiplying can also be enhanced by graphical models. Division, as shown by means of graphical models can be seen as follows; 1/4 / 1/2 really means how many 1/2’s are there in 1/4. This language is advantageous in teaching what division that involves fractions means.

With the type of student we come upon in an Applied Mathematics course the use of algorithms in the teaching of an operation such as division of fractions does not accomplish the goal of student mastery of the concept being presented. The student does not see the meaning of the steps in the algorithm and does not draw relationships between the steps. In short. the student does not understand the why or the how of division.

Using the computer, programming graphical models, and using the computer in conjunction with drill materials, it is believed that those instructors teaching fractions will have more success than they are presently experiencing.

In an Applied Mathematics course, one-fourth of the course is a unit dealing specifically with fractions. At the present time, the way in which the course is set up, in order to go on to the next unit .students must first pass a test on the material which was covered that marking period. It is evident by the extremely large numbers of students who have failed the unit on fractions before finally passing it, as well as the extremely large number of students who never passed the unit on fractions that a new approach is necessary.

This past school year at Richard C. Lee High School 182 students began courses in Applied Mathematics and of these, 65 still have not passed the unit on fractions. This large percentage definitely bears out the fact that students need help with fractions.

We will use the “golden rectangle” as our graphical model. We strongly believe that visualization is an essential tool in teaching and that this is especially true with those we deal with in an Applied Mathematics course. When these students see our pictorial models, it is strongly felt that they will understand the whys involved in the arithmetic of fractions and hopefully they will become proficient in the use of fractions. The computer will be the catalyst in getting many students to finally be able to work effectively with fractions.

The program that follows is very explicit and can be easily followed by the teacher and with a minimal amount of explanation to the student. It is hoped that many teachers will use our program in the teaching of fractions. It is strongly believed by the authors that the results will be very positive.

1 REM THE FOLLOWING PROGRAM IS DESIGNED TO HELP STUDENTS
2 REM WHO ARE WORKING WITH FRACTIONS BY ALLOWING THEM TO SIT
3 REM AT THE COMPUTER, AND BY FOLLOWING A SIMPLE SET OF
4 REM INSTRUCTIONS, VISUALLY SEE THE MEANING OF A FRACTION.
5 REM COMPARISON OF FRACTIONS, REDUCING FRACTIONS, AS WELL AS
6 REM THE BASIC MATHEMATICAL OPERATIONS INVOLVING FRACTIONS
7 REM IT IS STRONGLY BELIEVED THAT THIS VISUAL PRESENTATION
8 REM WILL GREATLY AID THE TEACHER IN THE TEACHING OF FRACTIONS
9 REM AND THE STUDENT IN THE LEARNING AND UNDERSTANDING OF FRACTIONS
10 REM THE PROGRAM WAS RUN ON A HEWLETT PACKARD COMPUTER
11 REM WHICH HAD A UNIQUE SUBROUTINE LIST. THE FOLLOWING ARE
12 REM THE SUBROUTINES IN OUR PROGRAM WHICH ARE FOUND ON THE
13 REM SUBROUTINE LIST.
14 REM
15 REM ****** * * *** ****** ******* * ******** ***
16 REM * CALL( 1, A, B, C, D) X-Y DIGITAL PLOTTER-PLOTTING *
17 REM * A. PEN CONTROL. A=O. PLOTTER MAKES DOT AT *
18 REM * CALLED POINT, LIFTS PEN A0. PLOTTER MOVES TO*
19 REM * CALLED POINT, NO MARK A0 PLOTTER DRAWS *
20 REM * STRAIGHT LINE TO CALLED POINT FROM PRESENT *
21 REM * POSITION, LEAVES PEN DOWN. *
23 REM * ABSOLUTE B,O, ADDRESS 10 REM * RELATIVE *
24 REM * C. X-AXIS COMPONENT OF CALLED POINT. *
25 REM * ->=X>=9999, X INTEGER *
26 REM * D: Y-AXIS COMPONENT OF 10 REM * CALLED POINT. *
27 REM * 0>=Y>=9999, Y INTEGER *
28 REM * CALL(2,A,B,C,D) X-Y DIGITAL PLOTTER-PRINTING
29 REM * A:
30 REM * B: PROJECTION OF A ON Y AXIS
31 REM * C: PROJECTION OF D ON X AXIS
32 REM * D: HEIGHT OF CHARACTER
33 REM * CALL(3,A(1,1),B) OSCILLOSCOPE DISPLAY:
34 REM * REGENERATION ROUTINE.
35 REM * A(1,1):
36 REM * MATRIX B: TOTAL NUMBER OF POINTS TO BE
37 REM * REGENERATED
38 REM * CALL(50,A) RUNS CALL(1,...) AND CALL(2,...) ON
39 REM * OSCILLOSCOPE
40 REM * CALL(3,...) MUST BE IN EFFECT
41 REM * A: CHOICE PARAMETER — A =0 PLOTS X-Y
42 REM * DIGITAL PLOTTER. A>0 PLOTS TO OSCILLOSCOPE
43 REM *
44 REM **********************************************
45 REM
46 REM THE FOLLOWING IS A LIST OF MAJOR PROGRAM VARIABLES
47 REM
48 REM *********************************************
49 REM
50 REM D= DENOMINATOR N= NUMERATOR
51 REM X0 = INITIAL X COORDINATE OF DENOMINATOR
52 REM RECTANGLE.
53 REM Y0 = INITIAL Y COORDINATE OF DENOMINATOR
54 REM * RECTANGLE
55 REM * Y1 = HIGHEST COORDINATE OF DENOMINATOR
56 REM * RECTANGLE
57 REM *
58 REM *********************************************
l01 CALL (5O, - 1 )
102 DIM U[15, 200]
103 CALL (3,U[1. 1]. 6000)
l08 PRINT “BIG Gus WELCOMES YOU TO FRACTION CITY”
109 PRINT
110 PRINT “TYPE THE NUMBER NEXT TO THE SECTION YOU WANT”
112 PRINT “ (1) PICK A FRACTION “
113 PRINT “ (2) WHICH FRACTION IS LARGER”
114 PRINT “ ( 3 ) REDUCING FRACTIONS “
115 PRINT “ (4) ADDING FRACTIONS”
116 PRINT “(5) SUBTRACTING FRACTIONS”
117 PRINT “(6) MULTIPLYING FRACTIONS”
118 PRINT “ (7) DIVIDING FRACTIONS “
120 PRINT
121 PRINT “ YOUR CHOICE IS “
122 INPUT B
130 IF B=1 THEN 1000
131 IF B=2 THEN 2000
132 IF B=3 THEN 3000
133 IF B=4 THEN 4000
134 IF B=5 THEN 5000
135 IF B=6 THEN 6000
136 IF B=7 THEN 7000
137 PRINT “ IN ORDER FOR THIS PROGRAM TO WORK “
138 PRINT “ YOU HAVE TO GIVE GUS A NUMBER “
139 PRINT “ FROM 1 TO 7 “
140 GOT0 110
1000 REM **************************************************
1001 REM
1002 REM **************************************************
1003 REM * *
1004 REM * THIS SECTION DEFINES A FRACTION *
1005 REM * *
1006 REM **************************************************
1010 LET V=2
1013 GOSUB 8O10
1020 LET X0=0
1030 LET Y0=2416
1040 LET X1=4181
1050 LET Y1=5000
1097 LET S1=7500
1098 LET S2=5700
1099 LET S3=890
1100 LET S4=1440
1101 LET S5=2840
1107 LET S6=8402
1108 LET S7=5000
1109 LET S8=9999
1112 LET A=0
1113 GOSUB 8070
1120 GOSUB 9900
1130 IF Q1=1 THEN 1010
1140 GOSUB 9910
1150 IF Q2=1 THEN 110
1160 GOSUB 9920
1170 GOTO 9999
2000 REM ***************************************
2001 REM
2002 REM ***************************************
2003 REM *
2004 REM * THIS SECTION COMPARES FRACTIONS
Z005 REM *
2006 REM ***************************************
2007 REM
2008 REM *** CHOOSE THE FRACTIONS ***
2009 LET V=2
2O10 GOSUB 9415
2071 REM
2072 REM ***************************************
2074 REM * PLOT THE FIRST FRACTION
2075 REM *
2076 REM ***************************************
2077 REM
2078 REM *** SIZE THE DENOMINATOR RECTANGLE ***
2080 LET X0=0
209O LET Y0=6000
2100 LET X1=2100
2110 LET Y1=7500
2115 REM
2126 REM *** VALUES FOR FIRST FRACTION ***
2130 LET N=N1
2140 LET D=D1
2175 REM
2176 REM *** POSITION THE NUMERAL ***
2180 LET S1=3200 2185 LET S2=7700
2190 LET S3=676
2195 LET S4=1094
2200 LET S5=6206
2215 REM
2216 REM *** POSITION THE FRACTION BAR ***
2220 LET S6=4000
2225 LET S7=7500
2230 LET S8=5000
2231 REM
2232 REM *** PLOT THE FIRST FRACTION ***
2233 LET A=0
2234 GOSUB 8070
2241 REM
2242 REM
2243 REM ********************************* ************
2244 REM *
2245 REM * PLOT THE SECOND FRACTION
2246 REM *
2247 REM *********************************************
2248 REM
2250 REM *** SIZE THE DENOMINATOR RECTANGLE ***
2270 LET Y0=1000
2290 LET Y1=2500
2295 REM
2306 REM *** VALUES FOR SECOND FRACTION ***
2310 LET N=N2
232O LET D=D2
2355 REM
2356 REM *** POSITION THE NUMERAL ***
2365 LET S2=-2700
2380 LET S5=1206
2385 REM
2386 REM *** POSITION THE FRACTION BAR ***
2405 LET S7=2500
2411 REM
2415 REM *** PLOT THE SECOND FRACTION ***
2416 GOSUB 8070
2421 REM
2422 REM
2423 REM *********************************************
2424 REM *
2425 REM * FIND EQUIVALENT FRACTIONS
2426 REM *
2427 REM *********************************************
2428 REM
2430 GOSUB 8455
2435 REM
2436 REM
2437 REM ********************************************
2438 REM *
2439 REM * PLOT THE FIRST EQUIVALENT FRACTION
2440 REM *
2441 REM ********************************************
2442 REM
2445 REM *** SIZE THE DENOMINATOR RECTANGLE ***
2450 LET X0=5000
2460 LET Y0=6000
2470 LET X1=7100
2480 LET Y1=7500
2495 REM
2496 REM *** EQUIVALENT FRACTION VALUES ***
2500 LET N=N3
2510 LET D=C3
2545 REM
2546 REM ***POSITION THE NUMERAL ***
2550 LET S1=8000
2555 LET S2=7700
2570 LET S5=6206
2585 REM
2586 REM *** POSITION THE FRACTION BAR ***
2590 LET S6=8800
2595 LET S7=7500
2600 LET S8=9999
2601 REM
2605 REM *** PLOT FIRST EQUIVALENT FRACTION ***
2606 GOSUB 8070
2612 REM
2613 REM **********************************************
2614 REM *
2615 REM * PLOT SECOND EQUIVALENT FRACTION *
2617 REM **********************************************
2618 REM
2619 REM ***SIZE THE DENOMINATOR RECTANGLE ***
2625 LET Y0=1000
2630 LET Y1=2500
2636 REM
2646 REM ***VALUES FOR SECOND EQUIVALENT FRACTION ***
2650 LET N=N4
2660 LET D=C3
2695 REM
2696 REM ***POSITION THE NUMERAL ***
2705 LET S2=2700
2720 LET S5=1206
2735 REM
2736 REM *** POSITION THE FRACTION BAR ***
2745 LET S7=2500
2755 REM
2756 REM *** PLOT THE SECOND FRACTION ***
2760 GOSUB 8070
2765 REM
2766 REM *** CONTINUE THIS SECTION ***
2770 GOSUB 9900
2780 IF Q1=1 THEN 2010
2785 REM
2786 REM *** TRY ANOTHER SECTION ? ***
2790 GOSUB 9910
2800 IF Q2=1 THEN 110
2810 GOSUB 9920
2820 GOTO 9999
3000 REM **************************************************
3001 REM
3002 REM **************************************************
3003 REM *
3004 REM * THIS SECTION REDUCES FRACTIONS *
3005 REM * *
3006 REM **************************************************
3007 REM
3008 REM *** CHOOSE THE FRACTION ***
3009 REM *** VALUE>=2 ***
3010 LET V=2
3060 GOSUB 8010
3070 REM
3071 REM **************************************************
3072 REM * *
3073 REM * PLOT THE ORIGINAL FRACTION
3074 REM * *
3075 REM **************************************************
3076 REM
3077 REM *** SIZE THE DENOMINATOR RECTANGLE ***
3080 LET X0=0
3081 LET Y0=900
3090 LET X1=2500
3095 LET Y1=5000
3135 REM
3136 REM *** POSITION THE NUMERAL ***
3140 LET S1=1
3150 LET S2=6230
3160 LET S3=1000
3170 LET S4=1640
3180 LET S5=2130
3181 REM
3182 REM *** PLOT ORIGINAL FRACTION ***
3183 LET A=5
3187 GOSUB 8070
3191 REM
3192 REM **************************************************
3193 REM * *
3194 REM
3195 REM * *
3196 REM **************************************************
3197 REM
3200 GOSUB 8660
3201 REM
3202 REM
3203 REM
3204 REM * PLOT REDUCED FRACTION
3205 REM
3206 REM
3207 REM
3208 REM *** CHECK FOR FRACTION LESS THAN ONE ***
3210 IF R>1 THEN 3360
3215 REM
3216 REM *** PLOT WHOLE NUMBER RECTANGLE ***
3220 LET X0=5000
3225 LET X1=7500
3230 LET Y1=9100
3235 REM *** SET RETURN PARAMETER ***
3240 LET A=1
3245 GOSUB 8070
3247 REM *** PLOT A “1” IN THE RECTANGLE ***
3250 CALL (1,-1,1,5450,3700)
3255 CALL (2,1597,0.0,2584)
3258 PRINT “1”
3260 REM *** RETURN Y1 TO ITS ORIGINAL VALUE ***
3265 LET Y1=5000
3270 REM
3275 REM *** CHECK FOR MIXED NUMBER ***
3280 IF R=1 THEN 3500
3285 LET X0=7500
3290 LET x1 =9999
3300 LET S1=7500
3310 LET N=N-D
332O GOTO 3390
3341 REM
3342 REM *** PLOT REDUCED FRACTION AND NUMERAL ***
3360 LET X0=5000
3370 LET X1=7500
3380 LET S1=5000
3390 LET A=5
3400 GOSUB 8070
3495 REM
3497 REM ***CONTINUE THIS SECTION ? ***
3500 9900
3510 IF Q1=1 THEN 3010
3525 REM *** TRY ANOTHER SECTION ? ***
3530 GOSUB 9910
3540 IF Q2=1 THEN 110
3550 GOSUB 9920
3560 GOTO 9999
4000 REM ******************************************
4001 REM
4002 REM ******************************************
4003 REM * *
4004 REM * THIS SECTION ADDS FRACTIONS
4005 REM * *
4006 REM ******************************************
4007 REM
4008 REM *** CHOOSE THE TWO FRACTIONS ***
4010 GOSUB 9410
4016 REM
4020 REM *** PLOT THE FIRST FRACTION ***
4025 LET N=N 1
4030 LET D=D1
4040 GOSUB 9510
4168 REM
4169 REM *** PRINT PLUS SIGN ***
4170 CALL (1, - 1, 1,4800, 8200)
4175 CALL (1, 1, 1,5200,8200)
4180 CALL ( 1,- 1, 1, 5000. 8000)
4185 CALL ( 1, 1, 1,5000, 8400)
4186 REM
4190 REM *** PLOT THE SECOND FRACTION ***
4195 LET N=N2
4200 LET D=D2
4210 9590
4301 REM
4302 REM ************************************
4303 REM * *
4304 REM * PLOT N1 + N2
4305 REM * *
4306 REM ************************************
4307 REM
4308 REM *** PLOT FIRST FRACTION ***
4309 REM *** SIZE DENOMINATOR RECTANGLE ***
4310 GOSUB 9670
4326 REM
4336 REM *** VALUES FOR N1 RECTANGLE ***
4340 LET N=N1
4345 LET D=D1
4347 REM *** SET RETURN PARAMETER ***
4348 LET A=2
4350 GOSUB 8070
4355 REM
4356 REM *** PLOT N2 ADJACENT TO N1 ***
4360 LET X0=X0+L1
4365 LET X1=X1+L1
4370 LET N=N2
4375 LET D=D2
4380 GOSUB 8130
4382 REM ************************************
4383 REM * *
4384 REM * PLOT REDUCED SUM
4385 REM * *
4386 REM ************************************
4387 REM
4388 REM *** SIZE DENOMINATOR RECTANGLE ***
4390 GOSUB 9700
4400 GOSUB 9730
4455 REM
4456 REM *** FIND SUM ***
4460 LET N=N1*D2+D1*N2
4470 LET D=D1*D2
4475 REM
4476 REM *** REDUCE SUM ***
4480 GOSUB 8660
4485 REM
4486 REM *** CHECK FOR SUM LESS THAN ONE ***
4490 IF R>1 THEN 4620
4495 REM
4497 REM *** PLOT WHOLE NUMBER RECTANGLE ***
4500 LET Y1=3200
4505 REM *** SET RETURN PARAMETER ***
4510 LET A=1
4515 GOSUB 8070
4520 REM *** PLOT A “1” IN THE RECTANGLE ***
4525 CALL (1,-1,1,1500,1307)
4530 CALL (2,1597,0,0,987)
4535 PRINT “1”
4540 REM *** RETURN Y1 TO ITS ORIGINAL VALUE ***
LET Y1=1800
4550 REM *** CHECK FOR MIXED NUMBER ***
4555 IF R=1 THEN X0=4600
4570 LET X1=9200
4580 LET S1-5900
4590 LET N=N-D
4600 LET A=5
4610 GOTO 4640
4415 REM
4417 REM *** PLOT FRACTION AND NUMERAL ***
4420 LET A=0
4640 GOSUB 8070
4650 REM
4660 REM *** CONTINUE THIS SECTION ? ***
4670 GOSUB 9900
4680 IF Q1=1 THEN 4010
4690 REM
4700 REM *** TRY ANOTHER SECTION ? ***
4710 GOSUB 9910
4720 IF Q2=1 THEN 110
4730 GOSUB 9920
4740 GOTO 9999
5000 REM **************************************************
5001 REM
5002 REM **************************************************
5003 REM *
5004 REM * THIS SECTION SUBTRACTS FRACTIONS *
5005 REM *
5006 REM **************************************************
5007 REM
5008 REM *** CHOOSE THE FRACTIONS ***
5010 GOSUB 9410
5040 REM
5041 REM *** CHECK IF FIRST FRACTION LARGER ***
5042 IF N1/D1N2/D2 THEN 5070
5045 LET Z=N1/D1
5046 PRINT “GUS SAYS YOUR FIRST FRACTION HAS A VALUE OF “,Z
5047 PRINT “GUS NEEDS THE SECOND FRACTION TO BE LESS THAN “Z
5048 PRINT “PLEASE PICK ANOTHER SECOND FRACTION”
5049 GOSUB 8023
5O50 LET N2=N
5055 LET D2=D
5060 GOTO 5042
5065 REM
5066 REM *** PLOT THE FIRST FRACTION ***
5070 LET N=N1
5080 LET D=D1
5090 GOSUB 9510
5168 REM
5169 REM *** PRINT MINUS SIGN ***
5170 CALL (1,-1,1,4800,8200)
5180 CALL (1,1,1,5200,8200)
5191 REM
5220 REM *** PLOT THE SECOND FRACTION ***
5230 LET N=N2
5235 LET D=D2
5240 GOSUB 9590
5255 REM
5256 REM *** SAVE NUMERATOR LENGTH ***
5262 LET F=L1
5265 REM
5301 REM
5302 REM **************************************************
5303 REM * *
5304 REM PLOT N1-N2
5305 REM * *
5306 REM **************************************************
53O7 REM
5308 REM *** PLOT FIRST FRACTION ***
5309 REM *** SIZE DENOMINATOR RECTANGLE ***
531O GOSUB 9670
5336 REM *** SIZE N1 RECTANGLE ***
5340 LET N=N1
5345 LET D=D1
5347 LET A=2
5350 GOSUB 8070
5355 REM
5356 REM *** PLOT N2 FROM N1 ***
5358 LET X0=X0+L1
5360 LET X1=X0-F
5365 CALL (1,-1,1,X0.Y1)
5370 CALL (1,1,1,X1,Y3)
5375 CALL (1,1,1,X1,Y1)
538O CALL (1,1,1,X0,Y3)
5381 REM
5382 REM ********************************************
5383 REM *
5384 REM * PLOT DIFFERENCE
5385 REM *
5386 REM ***************************************
5387 REM
5388 REM *** SIZE DENOMINATOR RECTANGLE ***
539O GOSUB 9700
5410 REM
5415 REM *** FIND DIFFERENCE ***
5420 LET N=N1*D2-D1*N2
5430 LET D=D1*D2
5435 REM
5436 REM *** REDUCE DIFFERENCE ***
5440 GOSUB 8660
5445 REM
5476 REM *** PLOT FRACTION AND NUMERAL ***
5480 GOSUB 9730
5500 LET A=0
5505 GOSUB 8070
5510 REM
5515 REM *** CONTINUE THIS SECTION ***
5520 GOSUB 9900
5525 IF Q1=1 THEN 5010
5527 REM *** TRY ANOTHER SECTION ? ***
5530 GOSUB 9910
5535 IF Q2=1 THEN 110
5540 GOSUB 9920
5550 GOTO 9999
6000 REM ***************************************
6001 REM
6002 REM ***************************************
6003 REM *
6004 REM * THIS SECTION MULTIPLIES FRACTIONS
6005 REM *
6006 REM ********************************
6007 REM
6008 REM *** CHOOSE THE TWO FRACTIONS ***
6010 GOSUB 9410
6015 REM
6020 REM *** PLOT THE FIRST FRACTION ***
6025 LET N=N1
6030 LET D=D1
6035 GOSUB 9510
6045 REM
6046 REM *** PRINT MULTIPLICATION SIGN ***
6050 CALL (1,-1,1,4800, 8400)
6060 CALL (1,1,1,5200,8000)
6070 CALL (1,-1,1,4800,8000)
6080 CALL (1,1,1,5200,8400)
6090 REM
6095 REM *** PLOT THE SECOND FRACTION ***
6100 LET N=N2
6110 LET D=D2
6120 GOSUB 9590
6301 REM
6302 REM ********************************************
6303 REM *
6304 REM * PLOT N1 OF N2
6405 REM *
6306 REM ********************************************
6307 REM
6308 REM *** PLOT RECTANGLES FOR SECOND FRACTION ***
6309 REM *** SIZE DENOMINATOR RECTANGLE ***
6310 LET X0=5400
6320 LET X1=9999
6325 LET Y1=5000
6330 REM
6332 REM *** SIZE N2 RECTANGLE ***
6334 LET N=N2
6335 LET D=D2
6340 LET A=2
6345 REM
6346 REM *** PLOT RECTANGLES ***
6350 GOSUB 8070
6355 REM
6356 REM *** DIVIDE N2 INTO N1 PARTS ***
6358 LET L2=L1
6360 LET D=D1
6365 LET Y0=5000
6370 LET Y1=6400
6371 REM *** SET RETURN PARAMETER ***
6372 LET A=3
6373 REM
6374 REM *** PLOT N1 OF N2 ***
6375 GOSUB 8240
6376 REM *** PLOT NUMERATOR PARTS NOT USED ***
6378 LET A=3
6380 LET X1=X0+L2
6381 LET N=N1
6382 LET X0=X0+INT(L2*N/D+.5)
6385 CALL (1,-1,1,X0,Y0)
6386 CALL (1,1,1,X1,Y1)
6387 CALL (1,-1,1,X0,Y1)
6388 CALL (1,1,1,X1,Y0)
6390 REM
6391 REM **************************************************
6392 REM * *
6393 REM * PLOT THE PRODUCT *
6394 REM * *
6395 REM **************************************************
6396 REM
6398 REM *** FIND PRODUCT ***
6400 LET N=N1*N2
6410 LET D1=D1*D2
6415 REM
6416 REM *** REDUCE THE PRODUCT ***
642O GOSUB 8660
6425 REM
6426 REM *** SIZE THE DENOMINATOR RECTANGLE ***
6430 GOSUB 9700
6450 REM
6455 REM *** SIZE FRACTION AS NUMERAL ***
6510 REM
6540 REM
6550 REM *** PLOT PRODUCT ***
6555 LET A=0
6560 GOSUB 8070
6570 REM
6575 REM *** CONTINUE THIS SECTION ***
6590 GOSUB 9900
6600 IF Q1=1 THEN 6010
6605 REM
6610 REM *** TRY ANOTHER SECTION ***
6620 GOSUB 9910
6630 IF Q2=1 THEN 110
6640 GOSUB 9920
6650 GOTO 9999
7000 REM **************************************************
7001 REM
7002 REM **************************************************
7003 REM * *
7004 REM * THIS SECTION DIVIDES FRACTIONS *
7005 REM * *
7006 REM * **********************************************
7007 REM
7008 REM *** CHOOSE THE TWO FRACTIONS ***
7010 GOSUB 9410
7015 REM
7020 REM *** PLOT THE FIRST FRACTION ***
7025 LET N=N1
7030 LET D=D1
7040 GOSUB 9510
7042 REM *** SAVE NUMERATOR LENGTH ***
7043 LET L5=X3
7045 REM
7050 REM *** PRINT DIVISION SIGN ***
7055 CALL (1,-1,1,4800,8200)
7060 CALL (1,1,1,5200,8200)
7070 CALL (1,-1,1,4900,8300)
7073 CALL (2,200,0,0,200)
7075 PRINT “O”
7080 CALL (1,-1,1,4900,7900)
7083 CALL (2,200,0,0,200)
7085 PRINT “0”
7090 REM
7095 REM *** PLOT THE SECOND FRACTION ***
7100 LET N=N2
7105 LET D=D2
7110 GOSUB 9590
7112 REM *** SAVE NUMERATOR LENGTH ***
7114 LET L6=X3-5400
7115 REM
7116 REM *********************************
7117 REM *
7120 REM * PLOT N1 OVER N2
7122 REM *
7125 REM *********************************
7126 REM
7128 REM *** PLOT FIRST NUMERATOR ***
7130 LET X0=0
7135 LET Y0=5000
7140 LET X1=L5
7145 LET Y1=6400
7150 REM *** SET RETURN PARAMETER ***
7155 LET A=1
7160 GOSUB 8070
7165 REM
7170 REM *** PLOT SECOND NUMERATOR ***
7171 LET X0=0
7172 LET Y0=3600
7173 LET X1=L6
7174 LET Y1=5000
7180 REM *** SET RETURN PARAMETER ***
7182 LET A=1
7186 GOSUB 8070
7192 REM
7193 REM *******************************************
7194 REM *
7195 REM * PLOT QUOTIENT
7196 REM *
7197 REM *******************************************
7198 REM
7199 REM *** SIZE THE DENOMINATOR RECTANGLE ***
7200 GOSUB 9700
7203 GOSUB 9730
7205 REM
7206 REM *** FIND QUOTIENT ***
7207 LET N=N1*D2
7210 LET D=D1*N2
7215 REM
7216 REM *** REDUCE QUOTIENT ***
72Z5 REM
7226 REM *** CHECK FOR QUOTIENT LESS THAN ONE ***
7230 IF R>1 THEN 7450
7235 REM
7236 REM *** FIND WHOLE NUMBER ***
7740 LET Z1=N/D
7243 LET Z=INT(Z1)
7245 REM
7246 REM *** PLOT WHOLE NUMBER RECTANGLES ***
7250 LET P2=L6
7255 LET P1=L6
7260 LET P=0
7270 FOR W=1 TO Z
7280 CALL (1,-1,1,P,400)
7290 CALL (1,1,1,P,3200)
7300 CALL (1,1,1,P1,3200)
7310 CALL (1,1,1,P1,400)
7320 CALL (1,1,1,P,400)
7323 LET P=P+P2
7325 LET P1=P1+P2
7327 NEXT W
7330 REM
7332 REM *** PLOT THE NUMERAL ***
7335 CALL (1,-1,1,4000,1100)
7337 CALL (2,890,0,0,1440)
7339 PRINT Z
7340 REM
7345 REM *** CHECK FOR MIXED NUMBER ***
7350 IF Z=Z1 THEN 7520
7355 REM
7356 REM *** FIND FRACTION PART Of MIXED NUMBER ***
7360 LET N=N-D*Z
7370 LET X0=P
7380 LET X1=P1
7390 LET S1=6000
7400 LET S6=7000
7410 LET S8=9000
7420 GOTO
7455
7425 REM
7430 LET S1=X0
7440 GOSUB 9730
7445 REM
7448 REM *** PLOT FRACTION AND NUMERAL ***
7449 REM *** FIRST, USE PROPER DENOMINATOR LENGTH ***
7450 LET X1=L6
7455 LET A=0
7460 GOSUB 8070 7470 REM
7520 REM *** CONTINUE THIS SECTION ***
7520 GOSUB 9900
7525 IF Q1=1 THEN 7000 7530 REM
7535 REM *** TRY ANOTHER SECTION ***
7540 GOSUB 9910
7550 IF Q2=1 THEN 110 756O GOSUB 9920
7570 GOTO 9999
8000 REM
8001 REM
8002 REM ***************************************
8003 REM * *
8004 REM * SUBROUTINE TO PICK A FRACTION *
8005 REM * *
8006 REM *************************************
8007 REM
8010 PRINT
8011 PRINT “A FRACTION CONSISTS OF TWO PARTS “
8015 PRINT “A NUMERATOR (TOP NUMBER) AND A”
8016 PRINT “DENOMINATOR (BOTTOM NUMBER) “
8017 PRINT
8018 PRINT “GUS SAYS, PICK A FRACTION WHOSE VALUE IS LESS THAN”;V
8019 PRINT “GUS SAYS, THE TOP MUST BE LESS THAN”;V;”TIMES THE BOTTOM”
8023 PRINT
8024 PRINT “ FIRST PICK THE DENOMINATOR-THE NUMBER OF “
8025 PRINT “EQUAL PARTS INTO WHICH THE OBJECT IS DIVIDED”
8030 INPUT D
8035 PRINT
8040 PRINT “ NOW PICK THE NUMERATOR-THE NUMBER OF EQUAL PARTS “
8045 PRINT “YOU WISH TO USE “
8046 INPUT N
8047 PRINT
8048 IF V = N/D THEN RETURN
8049 LET Z=N/D
8050 PRINT “ YOUR FRACTION HAS A VALUE OF “;Z
8052 PRINT “REMEMBER, GUS HAS A SMALL SCREEN “
8053 PRINT “YOUR NUMERATOR IS Too LARGE “
8054 PRINT “YOU WANT TOO MANY EQUAL PARTS”
8055 GOTO 8019
8060 REM
8061 REM **************************************************
8063 REM * *
8064 REM * SUBROUTINE TO PLOT DENOMINATOR RECTANGLE *
8065 REM * *
8066 REM ***********************************************
8067 REM
8070 CALL (1,-1,1,X0,Y0)
8080 CALL (1,1,1,X1,YO)
8090 CALL (1,1,1,X1,Y1)
8100 CALL (1,1,1,X0,Y1)
8110 CALL (1,1,1.,X0,Y0)
8111 IF A=1 THEN RETURN
8115 REM
8116 REM
8117 REM **************************************************
8118 REM * *
8119 REM * SUBROUTINE TO PLOT NUMERATOR RECTANGLE *
8120 REM * *
8121 REM * SUBROUTINE VARIABLES *
8122 REM * L2 = LENGTH OF DENOMINATOR
8123 REM * HI = HEIGHT OF NUMERATOR
8124 REM * Y3 = HIGHEST Y COORDINATE OF NUMERATOR
8125 REM * L1 = LENGTH Of NUMERATOR
8126 REM * X3 = FARTHEST X COORDINATE OF NUMERATOR *
8127 REM * *
8128 REM **************************************************
8130 LET L2=X1-X0
8138 LET L2=X1-X0
8140 LET H1=Y1-Y0
8150 LET Y3=Y1+H1
8160 LET L1=INT(L2*N/D+.5)
8170 LET X3=X0+L1
8180 CALL (1,-1,1,X0,Y1)
8190 CALL (1,1,1,X3,Y1)
8200 CALL (1,1,1,X3,Y3)
8210 CALL (1,1,1,X0,Y3)
8220 CALL (1,1,1,X0,Y1)
82Z5 IF A=2 THEN RETURN
8227 REM
8228 REM **************************************************
8229 REM *
8230 REM * SUBROUTINE TO PLOT DENOMINATOR AS D PARTS
8231 REM * *
8232 REM * SUBROUTINE VARIABLES *
8233 REM * P2 = WIDTH OF INTERNAL *
8234 REM * P = X COORDINATE OF INTERNAL *
8235 REM * W = INTERVAL BEING PLOTTED *
8236 REM * *
8237 REM ******************************************
8238 REM
8240 LET P2=INT(L2/D+. 5)
825O LET P=X0
8260 FOR W=1 TO D-1
8270 LET P=P+P2
8280 CALL (1,-1,1,P,Y0)
829O CALL (1,1, 1,P,Y1)
8300 NEXT W
8310 IF A=3 THEN RETURN
8311 REM
8312 REM
8313 REM **************************************************
8314 REM * *
8315 REM * SUBROUTINE TO PLOT NUMERATOR AS N PARTS *
8316 REM * *
8317 REM **************************************************
8318 REM
8320 LET P1=INT(L2/D+. 5)
8330 LET P=X0
8340 FOR W=1 TO N-l
8350 LET P=P+P1
8360 CALL (1,-1,1,P,Y1)
8370 CALL (1,1,1,P,Y3)
8380 NEXT W
8390 IF A=4 THEN RETURN
8391 REM
8392 REM
8393 REM **************************************************
8394 REM * *
8395 REM * SUBROUTINE TO PRINT THE FRACTION AS A NUMERAL *
8396 REM * *
8397 REM * SUBROUTINE VARIABLES *
8398 REM * S1 = STARTING X POSITION *
8399 REM * S2 = STARTING Y POSITION (NUMERATOR) *
8400 REM * S3 = X WIDTH *
8401 REM * S4 = Y HEIGHT *
8402 REM * S5 = STARTING Y POSITION (DENOMINATOR) *
8403 REM * *
8404 REM **************************************************
8405 REM
8410 CALL (1,-1,1,S1,S5)
8411 CALL (2, S3,0,0,S4)
8412 PRINT D
8415 CALL (1,-1,1,S1,S2)
8416 CALL (2,S3,0,0,S4)
8417 PRINT N
8418 IF A=5 THEN RETURN
8419 REM
8420 REM
8421 REM **************************************************
8422 REM *
8423 REM * SUBROUTINE TO PRINT FRACTION BAR
8424 REM *
8425 REM * SUBROUTINE VARIABLES
8426 REM * S6 = STARTING X POSITION
8427 REM * S7 = STARTING Y POSITION
8428 REM * S8 = FINAL X POSITION *
8429 REM * *
8430 REM **************************************************’
8431 REM
8432 CALL (1,-1,1,S6,S7)
8433 CALL (1,1,1,S8,S7)
8434 RETURN
8438 REM
8439 REM
8440 REM **************************************************
8441 REM *
8442 REM * SUBROUTINE TO FIND EQUIVALENT FRACTIONS
8443 REM *
8444 REM * SUBROUTINE VARIABLES *
8445 REM * C1 = ORIGINAL FIRST DENOMINATOR
8446 REM * C2 = ORIGINAL SECOND DENOMINATOR
8447 REM * C3 = COMMON DENOMINATOR
8448 REM * N3 = NEW FIRST NUMERATOR
8449 REM * N4 = NEW SECOND NUMERATOR
8450 REM * *
8451 REM **************************************************
8452 REM
8455 LET C1=D1
8460 LET C2=D2
8480 IF C1=C2 THEN 8600
8490 IF C1C2 THEN 8550
8500 LET Z=C2/C1
8510 LET Z1=INT(Z)
8520 IF Z1=Z THEN 8620
8550 LET Z=C1/C2
8560 LET Z1=INT(Z)
8570 IF Z1=Z THEN 8600
8580 LET C1=C1+D1
8590 GOTO 8550
8600 LET C3=C1
8610 GOTO 8630
8620 LET C3=C2
8630 LET N3=C3/D1*N1
8640 LET N4=C3/D2*N2
8650 RETURN
8651 REM
8652 REM
8653 REM **************************************************
8654 REM * *
8655 REM * SUBROUTINE TO REDUCE FRACTIONS *
8656 REM * *
8657 REM **************************************************
8658 REM
8659 REM *** FACTOR OUT THE GREATEST COMMON FACTOR ***
8660 FOR I=N TO 2 STEP -1
8670 LET Z=N/I
8680 LET Z1=INT(Z)
869O IF Z#Z1 THEN 8760
8700 LET Z2=D/I
8710 LET Z3=INT(Z2)
8730 LET N=N/I
8740 LET D=D/I
8750 GOTO 8770
8760 NEXT I
8766 REM *** CHECK FOR IMPROPER FRACTION ***
8770 If N>D THEN LET R=0
8773 IF N=D THEN LET R=1
8775 IF ND THEN LET R=2
8776 RETURN
8799 LET X1=X1-X0
9400 REM
9401 REM
9402 REM **************************************************
9403 REM * *
9404 REM * SUBROUTINE TO PICK TWO FRACTIONS *
9405 REM * *
9406 REM **************************************************
9407 REM
9408 REM *** CHOOSE THE FIRST FRACTION ***
9410 LET V=1
9415 GOSUB 8010
9420 LET N1=N
9425 LET D1=D
9430 REM
9435 REM *** CHOOSE THE SECOND FRACTION ***
9436 PRINT
9440 PRINT “NOW PICK THE OTHER FRACTION”
9445 GOSUB 8017
9450 LET N2=N
9455 LET D2=DD
9460 RETURN
9500 REM
9501 REM **************************************************
9502 REM*
9503 REM * SUBROUTINE TO PLOT FIRST FRACTIONS (+,-,*,/)
9504 REM * *
9505 REM **************************************************
9506 REM
9508 REM *** SIZE THE DENOMINATOR RECTANGLE ***
9510 LET X0=0
9515 LET Y0=6800
9520 LET X1=4600
9525 LET Y1=8200
9527 REM
9528 REM *** POSITION THE NUMERAL ***
9535 LET S2=8615
9540 LET S3=920
9545 LET S4=570
9550 LET S5=7215
9555 REM *** SET RETURN PARAMETER ***
9560 LET A=5
9565 REM
9566 REM *** PLOT FIRST FRACTION***
9570 GOSUB 8070
9575 RETURN
9580 REM
9581 REM ***********************************************
9582 REM * *
9583 REM * SUBROUTINE TO PLOT SECOND FRACTION(+,-,*,/) *
9584 REM * *
9585 REM **************************************************
9586 REM
9587 REM *** SIZE THE DENOMINATOR RECTANGLE ***
9590 LET X0=5400
9595 LET Y0=6800
9600 LET X 1 =9999
9605 LET Y1=8200
9607 REM
9608 REM *** POSITION THE NUMERAL ***
9610 LET S1=6840
9615 LET S2=8615
9620 LET S3=920
9625 LET S4=570
9630 LET S5=7215
9635 REM
9636 REM *** SET RETURN PARAMETER ***
9640 LET A=5
9645 REM
9646 REM *** PLOT THE SECOND FRACTION ***
9650 GOSUB 8070
9655 RETURN
9660 REM
9661 REM **************************************************
9662 REM * **
9663 REM *SUBROUTINES TO STORE DENOMINATOR RECTANGLES AND *
9664 REM *PARAMETERS FOR FINAL NUMERAL *
9665 REM * *,
9666 REM **************************************************
9667 REM
9670 LET X0=0
9475 LET Y0=3600 9680 LET X1=4600 9685 LET Y1=5000 9690 RETURN
9695 REM
9700 LET X0=0
9705 LET Y0=400
9710 LET X1=4600 9715 LET Y1=1800 9720 RETURN
9725 REM
9730 LET S1=4200 9732 LET S2=2215 9734 LET S3=920
9736 LET S4=570
9738 LET S5=795
9740 LET S6=5000 9742 LET S7=1800 9744 LET S8=7000 9750 RETURN
989O REM
9891 REM
9892 REM **************************************************
9893 REM * *
9894 REM * WISH TO CONTINUE SUBROUTINE *
9895 REM * *
9896 REM **************************************************
9900 PRINT
9901 PRINT “ D0 YOU WISH TO CONTINUE THIS SECTION ? “
9902 PRINT “ YES = 1, NO = 0 “;
9903 INPUT Q1
9904 CALL (3,U[1,1],6000)
9905 RETURN
9906 REM
9910 PRINT “DO YOU WISH To TRY ANOTHER SECTION ?”
9911 PRINT “YES = 1, NO = 0 “;
9912 INPUT Q2
9913 RETURN
9915 REM
9920 PRINT “THANKS ! ! ! COME BACK AGAIN. NOW LET ME TALK”
9921 PR I N T “TO SOMEONE ELSE”
9925 RETURN
9999 END
Output for Picking a Fraction
(figure available in print form)
Output for Comparison of Fractions
(figure available in print form)
Output for Reducing a Fraction
(figure available in print form)