Question: Home Work Define a function called price_hotel with one argument night as input. The hotel costs $140 per night. So the function price_hotel should return

Home Work

Define a function called price_hotel with one argument night as input. The hotel costs $140 per night. So the function price_hotel should return 140*night.

Define a function called Price_plain that takes a string, city, as input. The function should return a different price depending on the location, below are the valid destinations and their corresponding round-trip prices.

"Slemani": 190 "Hawler": 200 "Duhok": 150 "Karkuk": 130

After that define a function called price_rent_car with an argument called days. Calculate the cost of renting the car: Every day you rent the car costs $40. (cost = 40*days) if you rent the car for 7 or more days, you get $50 off your total (cost -=50). Alternatively (elif), if you rent the car for 3 or more days, you get $20 off your total. You cannot get both of the above discounts.

Return the cost. then define a function called total_trip which takes two arguments, city and day. Like the example above, have your function return the sum of calling the price_rent_car(day), price_hotel(day) and price_rent_plain(city) functions.

Modify your money_spend function definition. add a third argument, money_spend.

Modify what money_spend function does. Add the variable money_spend to the sum that it returns.

Input all of the data using User Input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!