Python - Taking a Vacation - Transportation - Why won't this work?


#1

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

** I have checked the indentation and it all seems OK. The ERROR message is: “Did you create a function called rental_car_cost?”… and, Yes, I did…

image
Please help!


#2

NEVERMIND! I figured out the problem…

The indentation for the function rental_car_cost needed to be moved to the left one space.


#3

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