Program to find the surface volume and area of a cylinder.

Code:

import math

r = float(input("Please enter radius: "))

h = float(input("Please enter height: "))

vol = math.pi*(r**2)*h

area =  (2 * math.pi*r*h) + (2 * math.pi * (r**2))

print("Volume of cylinder: ", vol)

print("Area of cylinder: ", area)

Output:

Comments

Popular posts from this blog

State use of pep and pip