Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. """Jayson Roy Tai, jtai406, 932126641,
  2. calculating the surface area and the volume of a cone from user input data"""
  3.  
  4. import math
  5.  
  6. print("#" * 34)
  7. print(" " * 7 + "Right Circular Cone \nSurface Area and Volume Calculator")
  8. print("#" * 34)
  9. print()
  10.  
  11. radius = int(input("Radius: "))
  12. height = int(input("Height: "))
  13.  
  14. surface_area = math.pi * radius * (radius + math.sqrt(radius ** 2 + height **2))
  15. volume = (1/3) * math.pi * radius ** 2 * height
  16.  
  17. print()
  18. print("Suraface Area:", round(surface_area, 4))
  19. print("Volume:", round(volume, 4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement