Given the Radius and Height of a cylinder, you can compute the Volume using this formula. This activity allows you to write a program to prompt for the values of the Radius and Height of a cylinder so that you can then compute the Volume.
The formula for the volume of a cylinder is
V = p R2 H cubic units
Where
V = Volume
R = Radius of the base
H = Height of the cylinder
This program could be useful for a variety of activities such as:
• | Providing a table with many values of Radius and Height and having students fill out the Volume column |
• | Running a program to fill in the values for Volume in the table |
Some questions to investigate:
• | (If formula is unknown to the student), what pattern do you see in the Volume numbers to make a good guess at the formula? |
• | What is the largest Volume found? |
• | How much does the Volume increase if the Height increases by one unit? |
• | How much does the Volume increase if the Radius increases by one unit? |
Running a program repeatedly as a tool allows quick analysis for higher-level thinking problems.
Programming the Formula to find the Volume of a Cylinder given Radius and Height
|
|
The Name= prompt is displayed, and [2nd] [A-lock] (alpha-lock) is on. Tip: The alpha characters are upper right above keys on the keypad and are pasted when [alpha] or
|
|
|||
Tip: Program names can have a maximum of eight characters. First character must be a letter. Notice the checkerboard cursor on the screen when the maximum is reached. |
|
|||
The colon ( : ) in the first column of the second line indicates the beginning of a command line. Note: On the calculator, the command lines are not numbered as when using the |
|
Whoever uses your program will have to input the Radius and Height values. You will use the Prompt command.
Note: For this example, you will use the Catalog Help feature to illustrate this built-in argument syntax help in the calculator. If you already know the arguments for a command, you can select a menu item and paste them to the Program Editor without using Catalog Help. |
|
|||||||||
|
|
|||||||||
|
|
|||||||||
Store the formula for the volume of a cylinder:
|
|
Create a command line to display the calculated volume:
Disp is pasted to the command line. Tip: Remember you can press [+] on most commands to use the Catalog Help syntax editor to see the correct arguments for commands.
This will display the text VOLUME IS on one line and the calculated value of V on the next line of the Home Screen when you run the program. |
|
Your program is complete! Now run the program from the Home Screen.
The items on this menu are the names of stored programs. |
|
||||||
|
|
To find the volume of the cylinder with Radius 1.5 cm and Height 3 cm, complete the following steps.
The text VOLUME IS, the value of V, and Done are displayed. The volume of the cylinder is displayed to 8 decimal places as
|
|