Question: Program 3 : modular.py For your third program, you will write a program that uses the constants and functions that are part of the Math

Program 3:
modular.py
For your third program, you will write a program that uses the constants and functions that are part of the Math and Random modules for Python. Your program will:
Calculate the volume of a Sphere.
Calculate the factorial of a randomly generated number between 1 and 10.
The formula for the volume of a sphere is shown below. You will need to use the pi constant and the pow() function in the Math module to write a python expression of the following equation.
Volume =43r3
Your program should ask the user to enter the radius of the sphere. To generate the random number between 1 and 10, you will need to use the randint() function in the Random module. To compute the factorial of a number, you will need to use the factorial() function in the math module. The floating-point value must be formatted to display only two digits after the decimal point.
Example Output
Your output should be formatted like the image below.
Please enter the radius of the sphere: 3 The volume of a sphere with radius of 3 is 113.10
The factorial of 3 is 6
 Program 3: modular.py For your third program, you will write a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!