Error in Transportation


#1


https://www.codecademy.com/courses/python-beginner-P5YtY/1/3?curriculum_id=4f89dab3d788890003000096#

Error I get:
Oops, try again. It looks like rental_car_cost returns None instead of the correct amount (40) for 1 days.

My code:

def rental_car_cost(days):
rental = days*40
if days >=7 :
return rental - 50
elif days >=3 :
return rental - 20

Could anyone help me enlighten what is wrong in the above code and help me fix the error


#2

Remember to return rental at the very end so the undiscounted amount is returned when there is no discount.


#9

thanks a lot for your reply


#10