Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Python write functions: def sphereVolume ( r ) def sphereSurface ( r ) def cylinderVolume ( r , h ) def cylinderSurface ( r
In Python write functions:
def sphereVolumer
def sphereSurfacer
def cylinderVolumer h
def cylinderSurfacer h
def coneVolumer h
def coneSurfacer h
that compute the volume and surface area of a sphere with radius r a cylinder with a circular base with radius r and height h and a cone with a circular base with radius r and height h You will need to use the pi and sqrt functions from the math library. Then, write a program that prompts the user for the values of r and h calls the six functions, and prints the results.
The formulas are
volume of a sphere
V
pi
r
surface area of a sphere
A
pi
r
volume of a cylinder
Vpi
r
h
surface area of a cylinder
A
pi
r
h
pi
r
volume of a cone
Vpi
r
h
surface area of a cone
look this up on Google
The input and out should look like this the user entered numbers are in bold for example only:
Enter the radius:
Enter the height:
A sphere has volume:
A sphere has surface area:
A cylinder has volume:
A cylinder has surface area:
A cone has volume:
A cone has surface area:
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