Q.Write a function that:
(i) Asks the user to input a diameter of a sphere (centimetres,
inches, etc.)
(ii) Sets a variable called radius to one-half of the number
(iii) Calculates the volume of a sphere using this radius and the
formula:
Volume = 4/3 pi*r*3
(iv) Prints a statement estimating the volume of the sphere;
include the appropriate unit information in litres or quarts
(Note that here are 1000 cubic cm in a litre and 57.75 cubic inches in a quart)
(v) Returns this same amount as the output of the function.
Answers
Answered by
11
Answer:pi=22/7
radian = float(input('Radius of sphere: '))
sur_area = 4 * pi * radian **2
volume = (4/3) * (pi * radian ** 3)
print("Surface Area is: ", sur_area)
print("Volume is: ", volume)
Explanation:
Similar questions
Social Sciences,
5 months ago
Math,
5 months ago
Economy,
5 months ago
English,
10 months ago
Math,
1 year ago