I am stuck in one of the sections in the fuctions section while learning python 2.7.
the exercise is to calculate the cost of a vacation
the code is
def hotel_cost(days): return 140*days def plane_ride_cost(city): 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): cost=days*40 if days>=7: cost=cost - 50 return cost elif days>=3: cost=cost - 20 return cost else: return cost def trip_cost(days,city): return plane_ride_cost(city) + rental_car_cost(days) + hotel_cost(days)
the code works fine if I remove the last 2 lines but when I execute the whole code I get error msgs like
Oops, try again. trip_cost('Los Angeles', 9) raised an error: unsupported operand type(s) for -: 'str' and 'int'
kindly get back to me regarding this