#function to calculate volume of a cylinder def cylinderVolume(r,len): pi = 3.142 vol = pi*r*r*len return vol radius = float(input("Radius: ")) length = float(input("length: ")) volume = cylinderVolume(radius, length) print("Volume = ",volume) print("pi = ",pi)