Volume and Surface area of Hemisphere

import math

def volume(r):

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

print("Volume = ", '%.4f' %volume)

def surface_area(r):

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

print("Surface Area = ", '%.4f' %s_area)

r = 11

volume(r)

surface_area(r)


No comments: