def hotel_cost (nights): return 140 * nights
if city == "Charlotte": return 183 elif city == "Tampa": return 220 elif city == "Pittsburgh": return 222 elif city == "Los Angeles": return 475
rent = days * 40
if days >= 7:
return rent - 50
elif days >= 3:
return rent - 20
def trip_cost (city, days, spending_money):
return hotel_cost(days) + rental_car_cost(days) + plane_ride_cost (city) + spending_money
print trip_cost ("Los Angeles", 5, 600)
I get an error message. "Oops, try again. It looks like nothing was printed to the console!" I dont understand what im doing wrong. All my code is right uptil "def trip_cost" and it went wrong after I introduced Los Angeles and the city, spending money etc into the exercise.
I expected it to just print the city and cost etc. or atleast just say 'none', I have absolutely no idea what im doing wrong.
Replace this line with your code.