Advertisement
yusufbrima

Python code for calculating Area and Volume of the cylinder

Sep 29th, 2020
1,399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement