Question: Write a program that asks the user for a sphere radius in centimeters ( a float ) and displays its corresponding diameter and volume: diameter
Write a program that asks the user for a sphere radius in centimeters a float and displays its corresponding diameter and volume:
diametertimes radius
diameter times radius
volumefractimesPitimes radius
volume
times Pi times radius
The values for the diameter and the volume should be rounded to decimal places. You may use the round function to do so
Example:
Please enter a radius value in cm :
For the sphere of radius cm:
the diameter is and volume is
Note: The printed message should be exactly as shown in the example in order to pass the autograder tests
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
