8.Taking a Vacation, 4.Transportation
File "python", line 15, in
NameError: name 'days' is not defined
Line 15 is
if days >= 7:
I have 'days' defined in argument. My code is very similar to the example code as they use the argument 'tickets' and then to use 'tickets' in what would be the equivalent of 'days' in line 15.
I am asking why it is saying 'days' is not defined when I have it in the argument.
Please don't be harsh if i made a very simple mistake.
def rental_car_cost(days): cost = 40 * days if days >= 7: cost -= 50 elif days >= 3: cost - 30 else: print cost