Dec-03-2017, 05:56 PM
An Olympic-size swimming pool is 25 meters wide and 50 meters long (rectangular). The minimum of depth of the pool is 2 meters. So I need to write a function that takes a float parameter (depth) and return the volume of the pool. If the depth does not meet the minimum depth requirement of Olympic-size pool, return zero.
here is my code:
def pool_volume(depth):
x=float(x)
if x<2 :
return 0
else:
return 25*50*x
What is the mistake?
here is my code:
def pool_volume(depth):
x=float(x)
if x<2 :
return 0
else:
return 25*50*x
What is the mistake?