python-by-example-150-chall.../challenges27-34/challenge-032.py

8 lines
186 B
Python
Raw Normal View History

2019-07-17 14:56:46 +08:00
import math
radius = float(input('Enter cylinder radius : '))
depth = float(input('Enter cylinder depth : '))
area = math.pi * (radius**2)
volume = area * depth
print(round(volume, 3))