Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A formula for the volume of the cylinder is V = pi r ^ 2 * h where r is the radius and is the
A formula for the volume of the cylinder is
Vpi rh
where r is the radius and is the height of the cylinder.
You need to write three functions in Labm
A local function srPrompt to prompt the user for rand
No input argument, two returning values
A local function calcV to calculate the Volume of the cylinder.
Two input arguments, one returning values
A local function printV to print the Volume of the cylinder formatted with two decimal
places.
One input arguments, no returning values
Note: write the function as the local function in the main script put the function at the end
of the script
Second, use proper variables in the main script to call and connect the three functions.
The input value of r and the input value of your result should be like below: Problem
Enter the radius:
Enter the height of the cylinder:
The volume of the cylinder is:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started