What am I doing wrong


#1

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


#2

Should put the first return in an else statement at the end. Or else all inputs would just reach the first return and the function finishes without checking the if and elif.


#3

Thank you. It worked!


#4

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