yusufbrima

Python code for calculating Area and Volume of the cylinder

Sep 29th, 2020
1,184
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. radius=float(input("Enter Radius: "))
  2. height=float(input("Enter height: "))
  3. area =(radius**2)*(math.pi)
  4. print("The area of a cylinder with radius {0} is {1}".format(radius,area))
  5.  
  6.  
  7. volume =area*height
  8. print("The volume of a cylinder with radius {0} and height {1} is {2}".format(radius,height,volume))
  9.  
RAW Paste Data