Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Home Work a Define a function called nrxy_hotel with one argument shaw as input. The hotel costs $140 per night. So the function nrxy_hotel should

image text in transcribed

Home Work a Define a function called nrxy_hotel with one argument shaw as input. The hotel costs $140 per night. So the function nrxy_hotel should return 140*shaw. Define a function called Nrxy_tayara 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. O "Slemani": 190 "Hawler": 200 "Duhok": 150 "Karkuk": 130 After that define a function called nrxy_krey_sayara 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 techwy_safar which takes two arguments, shar and rozh. Like the example above, have your function return the sum of calling the nrxy_krey_sayara(rozh), nrxy_hotel(rozh) and nrxy_krey_tayara(shar) functions. Modify your techwy_safar function definition. add a third argument, paray_sarfkrdn. Modify what techwy_safar function does. Add the variable paray_sarfkrdn 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions