|Yale-New Haven Teachers Institute||Home|
Lauretta J. Fox
Extensive use of the computer has created a new industry that employs large masses of people. Thus, the present generation of school children must be educated to be able to fill the new and different job market. In the large urban high school limited facilities make it impossible for all students to enroll in a formal computer programming course. Yet, all students should have the opportunity to see how a computer works even if they do not enter the field. This unit of study will present an alternate method of acquainting young people with the computer. It will introduce some simple computer programming techniques in an informal manner to the students in the traditional classroom.
The mathematical topic included in the unit will be area of plane figures. The unit will begin by clearly derived to find the area of a rectangle, parallelogram, square, triangle, and trapezoid. The formulas then will be applied in the solution of problems. Sample problems with model solutions will be given. Exercises for practice consisting of problems of varying degrees of difficulty, will be written in the BASIC language to enable students to calculate areas of plane figures by using the computer. Each program will introduce a new technique, yet it will be simple enough to be presented informally and to be understood by any student who has no prior knowledge of computers or programming.
The material developed here may be used at several levels of instruction for the following purposes: (1) to teach the concept of area along with simple computer programming to middle school students, (2) to reinforce the concept of area and to introduce simple computer programming techniques to students enrolled in applied mathematics, consumer mathematics and basic geometry courses in the high school, (3) to teach the concept of area and computer programming in greater detail to high school students enrolled in a college preparatory geometry course.
The unit is not intended to be a complete course in computer programming, but merely an informal introduction to it in a traditional mathematics classroom setting. Hopefully, the unit will ignite a spark of interest and arouse the curiosity of the students. They will be encouraged to explore the field in greater depth by visiting nearby computer centers, watching how the computer is used, and talking with the people who run it.
The polygon JKLM has been divided into squares whose sides are each one unit long. The figure contains eighteen squares of the same size, therefore its area is eighteen square units.
Area of a Rectangle = Base x Altitude or A= bh
Example 1: Find the area of a rectangle whose base is 12.5 cm. and whose altitude is 18.6 cm. in length.
Solution: A- bh A = 12.5 x 18.6 = 232.50 square centimeters
Example 2: Find the area of a rectangle whose base is 9 in. and whose altitude is 3 ft. in length
Solution: The base and altitude must be represented by the same unit of measure before finding the area. h =3 feet or 3 x 12 = 36 inches
____Area= bh Area = 9 x 36 = 324 square inches
Example 3: Find the area of the figure on the left below.
|Area I||5 x 4||= 20 square units|
|Area II||2 x 3||= 6 square units|
|Area III||12 x 2||= 24 square units|
|Total Area||50 square units|
- 1. Find the area of rectangle EFGH with EF = 9.2 mm. and FG = 11.7 mm.
- 2. What is the length of the base of a rectangle whose area is 336 sq. ft. and whose altitude is 14 feet?
- 3. Find the area of a rectangle whose base is 30 yd. and whose diagonal is 34 yd.
- 4. Find the area of a rectangle whose base is 25 yd. and whose altitude is S2 ft.
- 5. Find the cost of painting four rectangular surfaces, each 22 ft. by 15 ft., if 1 gallon of paint will cover 100 sq. ft. and costs $14.95 a gallon.
- 6. Find the areas of the following figures:
Programs to calculate the area of a rectangle are illustrated below:
10 REM FIND THE AREA OF A RECTANGLE
Program 1 is written in a very elementary and straight-forward way. It demonstrates how the statements of a program are to be listed.
15 LET B =40
20 LET H =25
30 LET A = B*H
40 PRINT “BASE = “ B, “ALTITUDE =” H, “AREA= “ A
Result: BASE = 40 ALTITUDE = 25 AREA = 1000
10 REM FIND THE AREA OF SIXTEEN RECTANGLES
Line 10 “REM” is an abbreviation for “REMARK”. A REM statement may appear in any line of the program before the end statement. It does not affect the execution of the program, but it provides the programmer with an explanation if he wishes to review the program at a future date. If the REM statement takes more than one line, each line must be given a different number.
- Lines 15,20 assign values to the base and altitude of the rectangle
Line 30 gives a formula to find the area of the rectangle. Notice that the symbol * is used to indicate multiplication. Line 40 indicates what information is to be printed. Each character inside the quotation marks will be printed as shown. The values assigned to the variables outside the quotation marks will be printed. The commas separating the quantities to be printed tell the computer how to space the printed items. Groups of fifteen spaces are allowed for each quantity to be printed output line. The first space in each group is reserved for any required positive or negative The second quantity to be printed starts in the sixteenth space of the line. The third quantity starts in the thirty-first space, and so on. There can be no more than five groups of fifteen spaces each on any one line. Line 50 END tells the computer that the program is now complete. The word RUN typed in the line immediately following the END statement of a program commands the computer to begin execution of the program. Program 2 may be used to find the area of any number of rectangles. The number 16 was chosen arbitrarily. Three new concepts are introduced. They are: (1) printing results in tabular form under specified headings, (2) reading information from a data statement, (3) stopping the program as shown in line 19.
11 PRINT “BASE”, “ALTITUDE”, “AREA”
18 READ B, H
19 IF B = 0 THEN 70
30 LET A = B*H
40 PRINT B, H, A
45 GO TO 18
60 DATA 72,85,94,117,36,55,67,41,15,22,98,74
62 DATA 15,25,13,8,12.8,9.6,122,89,76,45,17
64 DATA 9,24,6,32,28,144,126,57,63,0,0
Line 11 tells the computer to print the words base, altitude and area as headings of columns in which the answers will appear. This command is placed at the beginning of the program so that it will be executed only once. Line 15 is a “dummy” print line. It causes the computer to skip a line between the heading of the column and the first item in the column. Line 18 tells the computer to the values assigned to the variables from the data statement. Line 19 tells the computer to stop running the program if B =0. If B = O this command is ignored and the computer proceeds to the next line of the program. Line 30 provides the formula needed to solve the problem. Line 40 instructs the computer to print the values of B, H, and A. This will be done in tabular form under the headings from line 11. Line 45 reroutes the computer back to line 18 to obtain a new set of values for B and H. The next three lines of the program will be executed with these new values. The process will continue in this loop until B -0. At this point the execution of the program will end. Lines 60 are the values to be assigned to the variables. 62 The values of the variables are printed in 64 alternate positions on the line. For example, B =72, H= 85, B= 94, H = 117, etc. The last value assigned to B must be O to stop the execution of the program. Since the data did not fit on one line it was necessary to use additional data lines starting with new numbers.
Example 1: Find the area of a square whose side is 8 1/4 in.
Solution: A = s2 A - 8 1/4 x 8 1/4= 68 1/16 square inches
Example 2: Find the side of a square whose area IS 169 sq. in.
Solution: s2- A s2= 169 s = (square root) 169 s= 13
1. Using a metric ruler measure the side of each square and find its area.
3. Find the shaded areas.
|Program 3||introduces interaction between the programmer and the computer. The results will be printed in a sentence.|
20 PRINT “HOW LONG IS THE SIDE OF THE SQUARE?”
30 INPUT S
40 IF S = 0 THEN 70
45 LET A = S 2
50 PRINT “THE SIDE OF THE SQUARE IS” S
60 PRINT “THE AREA OF THE SQUARE IS” A
65 GO TO 30
|Result:||How long is the side of the square?|
|? (The computer waits for the value to be typed) 49|
|The side of the square is 49.|
|The area of the square is 2401.|
|? (Here the computer waits for the next value.) 32|
|The side of the square is 32.|
|The area of the square is 1024.|
|? (This process repeats until the value O is given for a side, then the program stops.)|
____10 REM FIND THE AREAS OF ALL SQUARES WHOSE SIDES
Line 20 asks the programmer to provide the data necessary to solve the problem. Line 30 causes the computer to stop and wait for the programmer to type in the data. Line 40 tells the computer that the programmer is finished when O is given as the length of a side. Line 45 provides the formula to find the area of a square. The arrow pointing upward is used to signify that S is being raised to a power. The numeral 2 is the desired power. Lines 50 result in a printout of the words inside the 60 quotation marks as well as the values of the variables S and A Line 65 reroutes the computer back to line 30 for the next value of S. The program continues from line 30 to line 65 over and over until the value O is typed in to stop the program. Program 4 provides a method for finding the areas of many squares. It introduces the concept of incrementing a number.
____11 REM ARE MULTIPLES OF THREE FROM 9 TO 81
____19 LET S = 9
____30 LET A = S 2
____32 PRINT “S= “ S, “A= “A
____40 LET S= S + 3
____41 IF S > 81 THEN 60
____45 GO T0 30
|Result:||S = 9||A = 81|
|S = 12||A = 144|
|S 15||A 225|
|S 18||A 324|
|. . . . . .||. . . . . .|
|S 75||A 5625|
|S 78||A 6084|
|S 81||A 6561|
Line 40 S=S+3 is not an equation. It means to replace S 3 with the number whose value is 3 more than the previous value of S. Line 41 tells the computer to stop the program when the value of S becomes greater than 81. Line 45 reroutes the computer back to repeat lines 30, 32 and 40 until the value of S is greater than 81.
____NR to LM extended.
2. NR = PQ
3. LP =MN
4.’ LQP Å ’ MRN
5. LQ = MR
6.’ LMNP = ’LQP+ Quad.QMNP
7 Rectangle QRNP = Quad
QMNP + ’ MRN
8. ’ LQP+Quad.QMNP= Quad.
QMNP + ’ MRN
9. ’ LMNP =Rectangle QRNP
10. LM = QR
The area of a parallelogram equals the product of the base and an altitude drawn to that base. A =bh
- 1. From a point outside a line exactly one line may be drawn I to the given line.
- 2. 11 lines are everywhere equidistant.
- 3. Opposite sides of a ’ are =.
- 4. HL
- 5. CPCTC
- 6. Addition
- 7. Reason 6
- 8. Addition prop. of equality
- 10.Reason 8
- 11. Area of QRNP = QR x RN 11. Area of a rectangle = bh
- 12. Area of LMNP = QR x RN 12. Substitution
- ________________=LM x QP = bh
|Solution:||First one must find the length of altitude CE.|
|(CB)2 = (BE)2 + (CE)2|
|(10)2 = ( 6)2 + (CE)2|
|100 = 36 + (CE)2|
|64 = (CE)2|
|8 = CE|
|A = bh = AB x CE = 24 x 8 = 192 square units|
Program 5 introduces the concept of a counter when an operation is being performed many times. The counter I keeps a record of the number of times the operation has been performed. 10 REM FIND THE AREA OF FIFTEEN PARALLELOGRAMS 11 PRINT “BASE”, “ALTITUDE”, “AREA” 15 PRINT 18 LET I - 1 20 READ B, H 30 LET A = B*H 40 PRINT B,H,A 50 LET I = I+ 1 60 IF I 16 THEN 20 70 DATA 24,15,46,37,8,6,98,60,36,28,99,75,42,36 71 DATA 9,5,43,29,65,82,18,20,94,78,8,5,19,24,7,5 72 DATA 15,14,23,8,34.6,98.7,104.2 80 END Result: BASE ALTITUDE AREA 24 15 360
Line 18 initializes the counting process. I = 1 indicates that the area of the first parallelogram is about to be calculated. Line 50 I = I+ 1 instructs the computer to advance to the next parallelogram. Line 60 reroutes the computer back to line 20 to find the area of the new parallelogram provided the number of the parallelogram has not exceeded 15. As soon as I >15 the program will stop. Line 70 Although more than 15 sets of values for B 71 and H have been given, only the first 15 sets 72 of data will be used. Program 6 introduces the concept of a dimension statement and subscripted variables. 4 REM AREA OF ANY NUMBER OF PARALLELOGRAMS 5 PRINT “BASE”, “ALTITUDE”, “AREA” 6 PRINT 10 DIM B(100), H(100), A(100) 20 READ N 30 FOR I = 1 TO N 40 READ B(I), H(I) 50 LET A(I) = B(I)* H(I) 60 PRINT B(I), H(I), A(I) 70 NEXT I 80 DATA 14,23,34,46,57,65,78,86,98,76,56,74,88 81 DATA 90,12,34,56,78,86,122,204,368,456,765 82 DATA 215,332,445,895,766,34,68,88,66 90 END
Line 10 DIM is an abbreviation for DIMENSION. The DIM statement tells the compiler how many locations to reserve for a subscripted variable. DIM B(100) tells the compiler to reserve 100 memory locations for the values of B(1), B(2), etc. More locations may be reserved than are actually needed. Line 20 instructs the computer to read the first value given in the data line. This is the actual number of locations that will be used from the 100 locations reserved in line 10. Line 30 indicates that I will count the parallelograms from 1 to the value assigned to N. Line 40 introduces It tells the computer to assign the second value in the data line to B(1), the third value to H(1), the fourth value to B(2), the fifth value to H(2), and so on. Line 50 provides the formula to find the areas of the parallelograms. Line 60 instructs the computer to print the values of B(I), H(I), and A(I) in tabular form under the proper headings given in line 5. Line 70 advances the process to the next parallelogram. This will continue until the process has taken place N times.
Prove: ’ ABD Å ’ CDB
1. In ’ ABCD AB= DC and DA =CB
2. DB = DB
3. ’ ABD Å ’ CDB
1. Opposite sides of a are equal.
2. Reflexive property
Since the parallelogram ABCD is divided into two congruent triangles, the area of each triangle is equal to one half the area of the parallelogram.
Area of parallelogram ABCD =Area of ’ ABD + Area of ’ CDB Area of parallelogram ABCD =2 x Area of ’ ABD
____bh =2 x Area of ’ ABD
____1/2 bh =Area of ’ ABD
The area of a triangle equals one half the product of its base and altitude. A= 1/2 bh
Example 1: Find the area of a triangle whose base is 24 cm. and whose altitude is 15 cm.
Solution: A- 1/2 bh:A= 1/2 x 24 x 15 = 180 sq. cm.
|Example 2||Find the altitude of a triangle whose area is 126 sq. ft. and whose base is 42 ft.|
|Solution:||1/2 bh= A 1/2 x 42 x h =126 21h = 126 h = 6 ft.|
(figure available in print form)
- 5. Find the area of a right triangle whose legs measure 15 cm. and 20 cm. respectively.
- 6. What is the area of an equilateral triangle whose side measures 8 inches?
- 7. Find the area of triangle ABC if angle A is 30— AB=27 ft. and AC = 34 ft.
8. measures 26 in. and one leg measures 2 ft.
Program 7 introduces the idea of using the computer for or programmed learning. The student will do the problems then use the computer to check his answers. 10 REM FIND THE AREA OF A TRIANGLE 20 INPUT B, H 25 IF B 0 THEN 90 30 LET A = B*H/2 31 PRINT “WHAT IS YOUR ANSWER?” 35 INPUT A1 40 IF A1=A THEN 70 50 PRINT “YOUR SOLUTION IS NOT CORRECT. “ 51 PRINT “CALCULATE THE AREA AGAIN.” 52 PRINT “WHAT IS YOUR ANSWER THIS TIME? “ 53 INPUT A2 54 IF A2 = A THEN 70 55 PRINT “YOUR ANSWER STILL IS NOT CORRECT.” 56 PRINT “ YOU MAY TRY IT ONE MORE TIME.” 57 PRINT “WHAT ANSWER DO YOU HAVE NOW? “ 58 INPUT A3 59 IF A3 =A THEN 70 60 PRINT “YOUR ANSWER IS STILL WRONG. YOU WILL” 61 PRINT “NOT RECEIVE CREDIT FOR THIS PROBLEM.” 62 PRINT “GO ON TO THE NEXT PROBLEM.” 65 GO TO 20 70 PRINT “YOU ARE CORRECT. AREA=” A 71 PRINT “GO ON TO THE NEXT PROBLEM.’’ 72 GO TO 20 90 END Result: ? you type in the values of B and H.) WHAT IS YOUR ANSWER? ? (Here you type in your answer) YOU ARE CORRECT. AREA = GO ON TO THE NEXT PROBLEM. Or YOUR SOLUTION IS NOT CORRECT. CALCULATE THE AREA AGAIN. WHAT IS YOUR ANSWER THIS TIME? ? (Here you type in your answer.) YOU ARE CORRECT. AREA = GO ON TO THE NEXT PROBLEM. Or YOUR ANSWER STILL IS NOT CORRECT. YOU MAY TRY IT ONE MORE TIME. WHAT ANSWER DO YOU HAVE NOW? ? (Here you type in your answer.) YOU ARE CORRECT. AREA = GO ON TO THE NEXT PROBLEM. Or YOUR ANSWER IS STILL WRONG. YOU WILL NOT RECEIVE CREDIT FOR THIS PROBLEM. GO ON TO THE NEXT PROBLEM.
Line 20 causes the computer to stop and wait for the student to type in the values of the base and altitude of the triangle. Line 25 indicates that the program is finished and should stop when a negative value is assigned to the base. Line 30 provides the formula to find the area of the triangle. Line 31 asks the student for his answer. Line 35 causes the computer to wait until the student types in the answer that he has calculated to be the area of the triangle. Lines 40 indicate that the student has obtained the right 70, 71 answer and may proceed to the next problem. Line 72 reroutes the computer back to line 20 to obtain the values of the base and altitude of the next triangle. Lines 50 tell the student to solve the problem again, 51 because his answer is wrong. Line 52 asks the student for his second answer to the problem. Line 53 causes the computer to wait until the student types in the answer that he has just found. Lines 55 tell the student that his answer is still wrong, 56 but he may have one more chance to solve the problem correctly. Line 57 asks for the answer obtained on the third try. Lines 60 tell the student that his answer is wrong, 61, 62 credit will be given for the problem. He may not try again, but should Line 63 reroutes the computer back to line 20 to obtain the values and altitude of the next triangle.
A formula to find the area of ABCD may be obtained as follows:
Draw altitude BF perpendicular to DC extended.
Area of ABCD =Area of ’ ABD+ Area of ’ BCD.
Area of ’ ABD = 1/2 x AB x DE
Area of ’ BCD =l/2 x DC x BF
Area of ABCD =l/2 x AB x DE+ 1/2 x DC x EF
DE = BF
Area of ABCD = 1/2 x AB x DE + 1/2 x DC x DE
Area of ABCD= 1/2 x DE x (AB+ DC)
Area of ABCD =l/2 x altitude x (Base l+ Base 2)
The area of a trapezoid equals one half the product of the altitude and the sum of the bases.
Area of a trapezoid 1/2h(b1+b2)
|Example:||Find the area of a trapezoid whose bases are 8 in. and 12 in. and whose altitude is 10 in. long.|
|Solution:||A=1/2h(b1+b2) A=1/2x10x(8+12)=5x20=100 sq.in.|
Program 8 introduces the concept of sorting a set of numbers into ascending order
- 10 REM FIND THE AREA OF N TRAPEZOIDS AND ARRANGE THE
- 11 REM AREAS IN ORDER FROM SMALLEST TO LARGEST
- 20 DIM A(100), H(100) U(100), L(100)
- 25 PRINT “ALTITUDE”, “UPPER BASE”, “LOWER BASE”, “AREA”
- 30 PRINT
- 32 REM A = AREA, H= ALTITUDE, U= UPPER BASE, L = LOWER BASE
- 40 READ N
- 50 FOR I=1 TO N
- 60 READ H(I), U(I), L(I)
- 70 LET A(I)= H(I) * (U(I) + L(I))/2
- 80 PRINT H(I), U(I), L(I), A(I)
- 85 NEXT I
- 100 PRINT “THE AREAS ARRANGED IN ASCENDING ORDER ARE:”
- 120 FOR I = 1 TO N
- 130 FOR J = I + 1 TO N
- 140 IF A(I) A(J) THEN 180
- 150 LET Q = A(J)
- 160 LET A(J) = A(I)
- 170 LET A(I) = Q
- 180 NEXT J
- 185 PRINT
- 190 PRINT A(I)
- 200 NEXT I
- 210 DATA 6,8,12,20,12,12,15,14,24,28,40,3,11,2.5,3,5
- 211 DATA 9.8,3.4,7.5
- 220 END
|ALTITUDE||UPPER BASE||LOWER BASE||AREA|
|53.41||(Note: The actual computer printout|
|128||skips a line between each value at|
Lines 120 instruct the computer to compare in order 130 the value of each area with the value of 140 every other area that follows it. If the first number is less than the second of the two numbers being compared, the order remains the same. If the first number is greater than the second, proceed to line 150 to begin the process of reversing the position of the numbers. Line 150 assigns the value of the second number A(J) to a new variable Q. Line 160 assigns the value of the first number A(I) to the second number A(J). Line 170 assigns of A(J), to the first number A(I). Now A(I) and A(J) have been rearranged in ascending order of their values. Line 180 tells the computer to move on to the next comparison. Line 190 instructs the computer to print the numbers in order from smallest to largest.
The author combines computer programming with the teaching of mathematics. Many flowcharts are demonstrated. Capabilities of the Basic language are presented. Information for operation of programs and comments on error diagnosis are given. Printed results of program runs are shown.
Desmonde, William H. Computers and Their Uses. Second Edition. Englewood Cliffs, New Jersey: Prentice- Hall. Incorporated, 1971.
This book gives a glimpse into of digital data processing machines and their uses. It explains the concepts basic to design, programming and applications of the computer by means of simplified examples.
Halacy, D. S., Jr. Computers The Machines We Think With. New York: Harper and Row, 1962.
A history of computers from the abacus to the modern electronic digital computers. The basic theories and operation of digital computers are discussed in simple terms. A chapter is devoted to computer language. The effect of the computer on the worker and the economy is discussed. Many photographs, drawings and designs enliven the text.
Hare, Van Court, Jr. Introduction to Programming: A BASIC Approach. New York: Harcourt Brace and World, Incorporated, 1970.
An introduction to the use of electronic computers. It encourages the reader to go beyond what he has learned about elementary computer uses and to undertake more advanced applications. It pays attention to difficulty students have in moving from a problem statement to the formalization required to solve a problem. A six step method for doing, this is proposed. A comparison of Basic and Fortran is given.
Herbert, Frank, and Barnard, Max. Without Me You’re Nothing. New York: Simon and Schuster, 1980.
A book describing the computer, flow charts, and programming in very clear and concise language.
Nichols, Eugene D., et al. Geometry. New York: Holt, Rinehart and Winston publishers, 1978.
This text provides a balanced course designed to be mastered by all geometry students. Objectives of each lesson are given. These state very briefly and clearly the student’s expected performance at the completion of the lesson.
Rhoad, Richard, et al. Geometry for Enjoyment and Challenge. Evanston, Illinois: McDougal, Littell and Company, 1981.
A new high school geometry text suitable for students of all ability levels. Explanations are very clear and concise. Algebra is reinforced throughout the text. The material is presented in a pleasing manner.
A high school course in BASIC programming. The first four chapters may be used at the junior high level.
Hirsch, Christian R., et al. Geometry. Glenview, Illinois: Scott, Foresman and Company, 1979.
This text has an easy-to-follow format with visual appeal, plenty of exercises, built-in testing, and enrichment features.
Jurgensen, Ray C., et al. Geometry. New Edition. Atlanta: Houghton Mifflin Company, 1980.
A textbook used in many high school geometry classes. It is illustrated nicely and has many sample problems. Exercises are grouped according to their difficulty level.
Kohn, Bernice. Computers at Your Service. Englewood Cliffs, New Jersey: Prentice-Hall, Incorporated, 1962.
A history of computers and how they work written in very simple language for children. A glossary of terms is included.
Marateck, Samuel L. BASIC. New York: Academic Press, Incorporated, 1975.
This book is an outgrowth of notes the author used in a course in BASIC that he taught to undergraduates at New York University. It is written for students with no prior knowledge of computers or programming. Its purpose is to teach how to program in BASIC. One new concept is introduced in each program. Problems from various disciplines are discussed. Common mistakes in programming are shown.
Rothman, Stanley, and Mosmann, Charles. Computers and Society. Chicago: Science Research Associates,Incorporated, 1972.
The social consequences of computers are explored. The author gives the basic facts of computer technology then constructs an analysis of the social issues on this technological foundation.
Vorwald, Alan and Clark, Frank. Computers From Sand Table to Electronic Brain. Revised Edition. New York: Whittlesey House McGraw Hill Book Company, Incorporated, 1964.
A history of computers. Included are an explanation of number systems and instructions for building computers of all kinds. Line drawings simplify and complement the text.
Contents of 1981 Volume VI | Directory of Volumes | Index | Yale-New Haven Teachers Institute