CodeAcademy Car Rental II
days = int(raw_input("How many days do you want to rent da car for?"))
def rental_car_cost(days):
if days < 3:
return days * 40
elif days >= 3 and days <= 7:
return ((days * 40)-20)
elif days > 7:
return ((days*40) -50)
print rental_car_cost(days)
I'm trying to figure out why the code doesn't give 230 when I use 7 for
days. The problem seems to be in the 3rd if statement.
No comments:
Post a Comment