Surface Area of Hemisphere || Volume || Geometric Program || Python

In this we are going to see a basic program to calculate volume and surface area of hemisphere in Python Programming Language.


import math

# Function to calculate volume
def volume(r):
	volume = 2 * math.pi * math.pow(r, 3) / 3
	print("Volume = ", '%.4f' %volume,"cube units")

# Function to calculate surface area
def surface_area(r):
	s_area = 2 * math.pi * math.pow(r, 2)
	print("Surface Area = ", '%.4f' %s_area,"sq units")
	
# Driver code
r = 11
volume(r)
surface_area(r)

#Code by Shrinivas


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post