Transportation Error: An error was raised for rental_car_cost(1): unexpected EOF while parsing (<string>, line 0)


#1

I am Getting the Error
Oops, try again.
An error was raised for rental_car_cost(1): unexpected EOF while parsing (, line 0)
This is the code:

def hotel_cost(nights):
nights = input("How many nights? ")
return 140 * nights
def plane_ride_cost(city):
city = input("What city? ")
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475
else:
return "nope"
def rental_car_cost(days):
days = input("how many days for the car? ")
price = days * 40
if days >= 7:
price -=50
elif days >= 3:
price - 20
return price

Any help and an explanation of the error would be appreciated!
Thanks!!


#2

The intentions are off now that this is posted. I am pretty sure they are correct.


#3

Sorry indention not intention


#4

Your functions shouldn't take user input and they definitely shouldn't be evaluating python code, so stay away from the input function, forget it exists really. Use raw_input for reading text from console