It works, I believe but my issue is this... The raw_input value I enter is being changed for some reason. It works fine but since adding the Spending_money, it's randomly imputing it's own raw_inputs which is cancelling the ones I have entered.
city = raw_input("Type the city you're visiting." ) days = float(raw_input("Amount of days you're staying?")) def hotel_cost(nights): if nights: return 140 * nights else: return 0 def plane_ride_cost(city): if city == "Charlotte": print return 183 elif city == "Tampa": print return 220 elif city == "Pittsburgh": return 222 print elif city == "Los Angeles": return 475 print else: return "Please enter a valid location/amount of nights" def rental_car_cost(days): rent = 40 * days if days >= 7: return rent - 50 elif days >= 3: return rent - 20 else: return rent def trip_cost(city, days, spending_money): if spendingmoney(spending_money): return spending_money return rental_car_cost(days) + plane_ride_cost(city) + hotel_cost(days) + spendingmoney(spending_money) print trip_cost(city, days, spending_money)
Type the city you're visiting. Tampa
Amount of days you're staying? 4
function spending_money at 0x7f6bfac96410
Error code from assignment
Oops, try again. trip_cost('Tampa', 7, 70) returned 70 instead of the correct value 1500