Academic Year 2000-2001 Level V - Basic Programming "Computing the Volume of a Cylinder" Program r The first program will be an extremely simple one involving prompt and display commands and a calculation. The volume of a cylinder is given by the formula V r 2h . The following lines are the program lines that need to be entered into the calculator. h Prompt R,H Disp "VOLUME IS" Disp ÄR2H PrgmCYLVOL This can be done using the TI-Graph link software or directly into the calculator. Using the Graph link software is advisable for lengthy programs because of the ease of using the computer keyboard versus the calculator keypad. See the figure below. The TI-83 keypad on the left of the screen is used for symbols not on a computer keyboard such as . If you do not see the TI-83 keypad, go to the "Window" pull-down menu and choose "TI-83 Keypad." Once the lines of the program are typed, make sure your calculator is connected to the computer and turned on and click on the "Send" button. Page 1 of 4 Academic Year 2000-2001 Using the TI-83 keypad is great if you don't have a computer at hand. The user just has to know where the program commands are located such as "Disp" and "Prompt" because you don't use the letter keys to type these. Use the following steps to enter the volume of a cylinder program. 1. Hit the [PRGM] key and use the [right-arrow] key to move to the "NEW" menu. 2. Choose [1:Create New]. 3. Type the name of the program "CYLVOL" and hit the [ENTER] key. (Note that the ALPHA lock is already on.) NOW, we need to type in the lines of the program. LINE 1: Prompt R,H 4. Hit [PRGM] and use the [right-arrow] key to move to the "I/O" menu (input/output menu), Choose [2: Prompt] and use the alpha keys to type the rest of line 1. Then hit [ENTER]. LINE 2: Disp "VOLUME IS" 5. Hit [PRGM] and use the [right-arrow] key to move to the "I/O" menu. Choose [3: Disp] and use the alpha keys to type the rest of line 2. Note that " is found using the [ALPHA] key, followed by the [+] key. Then hit [ENTER]. LINE 3: Disp ÄR2H 6. Hit [PRGM] and use the [right-arrow] key to move to the "I/O" menu. Choose [3: Disp] and use the key pad to type the rest of line 3. Then hit [ENTER]. LINE 4: PrgmCYLVOL 7. Hit [PRGM], use the [down-arrow] key to scroll to [D:prgm] and use the alpha keys to type the rest of line 4. Then hit [ENTER]. Program: Distance Between Two Points Enter the following program into your calculator. If you are not able to find a command, check the table on the next page. PROGRAM:DISTANCE :ClrHome :Input "X1=",A :Input "Y1=",B :Input "X2=",C :Input "Y2=",D :((A-C)2 + (B-D)2)L :Disp "DISTANCE=",L :Stop (X1,Y1) (X2,Y2) Recall the symbol is the [STO] key found to the left of the number 1 key. Page 2 of 4 Academic Year 2000-2001 Location of Program Commands and Common Symbols on the TI-83 The following menu maps for the TI-83 will be helpful when you are entering programs. [PRGM] "CTL" menu 1:If 2:Then 3:Else 4:For( 5:While 6:Repeat 7:End 8:Pause 9:Lbl 0:Goto A:IS>( B:DS<( C:Menu( D:prgm E:Return F:Stop G:DelVar H:GraphStlye( "I/O" menu 1:Input 2:Prompt 3:Disp 4:DispGraph 5:DispTable 6:Output( 7:GetKey 8:ClrHome 9:ClrTable 0:GetCalc( A:Get( B:Send( "EXEC" menu 1:name 2:name 3:name [MATH] "MATH" menu "NUM" menu 1: abs( 2: round( 3: iPart( 4: fPart( 5: int( 6: min( 7: max( 8: lcm( 9: gcd( 1:Frac 2:Dec 3: 3 4: 3( 5: x 6: fMin( 7: fMax( 8: nDeriv( 9: fnInt( 0: Solver… "CPX" menu 1: conj( 2: real( 3: imag( 4: angle( 5: abs( 6:Rect 7:Polar {2nd} [Test] "Test" menu 1: = 2: 3: > 4: 5: < 6: "PRB" menu 1: rand 2: nPr 3: nCr 4: ! 5: randInt( 6: randNorm( 7: randBin( {2nd} [Angle] "Logic" menu 1: and 2: or 3: xor 4: not( "Angle" menu 1: 2: ' 3: r 4:DMS 5: RPr( 6: RP( 7: PRx( Exercises Answer the following questions on a separate sheet of paper. Page 3 of 4 8: PRy( Academic Year 2000-2001 1. Write a program that will find the area of a rectangle. Have the program ask for the height and width, then display the area. Call it "AREARECT". Write the lines of the program on your separate sheet of paper. 2. Write a program that will ask for an angle in degrees, then display the values of the trig functions sine, cosine, and tangent for the angle. Call it "TRIG3D". It would also be nice if the display would clearly state the answers. Write the lines of the program on your separate sheet of paper. 3. Enter the two previous programs into your calculator and answer the following questions using any of the programs in your calculator. a. What is the area of a rectangle whose height is 10 inches and width is 5 inches? b. What is the area of a rectangle whose height is 3 centimeters and width is 6 centimeters? c. What is the area of a rectangle with height 4 inches and width 2 feet? d. For the angle 25, what are the three main trig values (sine, cosine, tangent)? e. What is the volume of a cylinder whose radius is 2 cm and height is 3 cm? 4. What program do you think would be useful to write? Do you think you could write it? **After you are finished all the exercises on this handout, write your name at the top of your paper and turn it in for a grade. You need only submit the answers to the questions on this page. Keep the handout for future reference. Page 4 of 4