Transportation problem


#1

def rental_car_cost(days):
if days >= 7:
cost = (days40)/2
elif days >= 3 and days < 7:
cost = days
400.2
else:
cost = days
40
return cost
print cost

Thats my code. I’m pretty sure, that the elif cost part is wrong. Can anybody help me ?
Error code: Oops, try again. It looks like rental_car_cost returns 24.0 instead of the correct amount (100) for 3 days.


#2

you should give $20 or $50 dollar discount, no need to mess with percentages.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.