crzcas

volume of cylinder

Dec 19th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import math
  2.  
  3. print("lets calculate volume of cylinder with 2 values, ratio and high in cms.")
  4. input1 = input("ratio > ")
  5. input2 = input("high > ")
  6. ratio = float(input1)
  7. high = float(input2)
  8. #pi1 = 3.1416
  9. result = math.pi * ratio * ratio * high
  10. output = str(result)
  11. print("volume of cylinder = " + output + " cms^3")
Advertisement
Add Comment
Please, Sign In to add comment