Q. Write a program to input the radius of a sphere and calculate its volume.


Answer =


rad = int (input("Enter the radius :-"))
volume = (4/3) * 3.14 * rad ** 3
print ("Volume = ", volume)

Output:-

(a)

Enter the radius :-7
Volume =  1436.0266666666666
>>>

(b)
Enter the radius :-12
Volume =  7234.5599999999995
>>>
 

(c)
Enter the radius :-16
Volume =  17148.586666666666
>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post