def hotel_cost():
nights = input("how many days?")
return 140 * nights
def plane_ride_cost():
city = input("which city? Charlotte, Tampa, Pittsburgh or Los Angeles?")
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 = input("how many days for renting a car?")
pro_day = days * 40
if days >= 7:
return pro_day - 50
elif days >=3:
return pro_day - 20
else:
return pro_day
def trip_cost():
return nights + city + pro_day + spending_money
print trip_cost(hotel_cost(),plane_ride_cost(),rental_car_cost()+ spending_money)
hi guys, can someone help me with this piece of code? i learned it on codeacademy and modified , want to make it user friendly but after running code i can choose days and after city name and after error. i am very noob in python , appreciate any kind of advice , thanks