I am doing a project in code academy and I have to make a program that adds up all the vacation cost (like travel, city, ...etc). I am not sure what wrong with my code.
def hotel_cost(nights):return nights * 140def plane_ride_cost(city):if city == "Charlotte":return 183elif city == "Tampa":return 220elif city == "Pittsburgh":return 222elif city == "Los Angeles":return 475def rental_car_cost(days):if days < 3:return 40 * dayselif days >= 3 and days < 7:return days * 40 - 20 elif days >= 7:return days * 40 - 50def trip_cost(city,days):city = plane_ride(city)days = rental_car_(days) + hotel_cost(nights)return total_cost(city + days)
Also, any advice on how to make my code less redundant and clean.