Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
# 2 week cost calculation
def cost_of_city (return_flight, hotel_per_day,weekly_car_rental):
total_hotel_cost = hotel_per_day * 14
total_car_rental_cost = weekly_car_rental *2
trip_cost = return_flight + total_hotel_cost + total_car_rental_cost
return trip_cost
total_cost1 = cost_of_city (return_flight = 200,
hotel_per_day = 20,
weekly_car_rental =200
)
total_cost1
880
total_cost2 = cost_of_city (return_flight = 250,
hotel_per_day = 30,
weekly_car_rental =120
)