Ostatnio zacząłem się uczyć Pythona (pierwszy język na codecademy.com, jednak nie jestem wstanie naprawić błędu w kodzie,
def hotel_cost(nights):
return 140*nights
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):
if days>=7:
days = days*40-50
return days
elif days<7 and days >=3:
days=days*40-20
return days
return days *40
def trip_cost(city,days):
return city+days
Problem to : trip_cost('Charlotte', 6) raised an error: cannot concatenate 'str' and 'int' objects
Będę wdzięczny z odpowiedź