Oops, try again. An error was raised for rental_car_cost(1): invalid literal for int() with base 10: ''
When I run my code it works fine, as in all the numbers expected show and all calculations are done as expected. however I am still getting this error (10 was the amount of days i hired a car)
I'm stuck. can anyone shed some light on what the problem is?
def hotel_cost(nights): nights = int(raw_input('How many nights are you staying?:')) return nights * 140 def plane_ride_cost(city): city = raw_input('Where are you flying to?:') if city == 'Charlotte': return 183 elif city == 'Tampa': return 220 elif city == 'Pittsburgh': return 222 elif city == 'Los Angeles': return 475 def rental_car_cost(days): days = int(raw_input('How many days would you like to rent a car for?:')) cost = days * 40 if days >= 7: return cost - 50 elif days >= 3: return cost - 20 hbill = 'Hotel Bill = ' + str(hotel_cost(nights)) fbill = 'Air Fare = ' + str(plane_ride_cost(city)) cbill = 'Car Hire = ' + str(rental_car_cost(days)) print hbill print fbill print cbill print 'Total = ' + str(total)