Computer Science, asked by rihanjumon, 3 months ago

a python program to find the volume of sphere

Answers

Answered by Gurleyvampire
2

Answer:

#impotr math package to use math.pi for the value of PI.

import math.

#take radius of the sphere from user.

r=float(input("Enter the r of a sphere"))

#calculate the surface area of sphere.

s_area=4*math.pi*pow(r,2)

#calculate the volume of sphere.

volume=(4/3)*math.pi*pow(r,3)

Similar questions