I tried to write an OOPS python program to calculate the volume of cylinder but when I run my code I get"Process returned 0". I need to define class "Cylinder", take input from the user. Below is my code. What am I doing wrong?
from math import pi
# FUNCTIONS
def cylinder_volume(radius, height):
return ((pi * (radius ** 2))*height)
# main
def Cylinder():
radius = float(input("Radius="))
height = float(input("Height="))
print("Cylinder volume: %d" % (cylinder_volume(radius, height)))
# PROGRAM RUN
if __name__ == "__Cylinder__":
Cylinder()