Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A car rental company provides three types of cars with the following daily prices Car Type Day Price Insurance (in OMR) Charge Salon 15 SUV

image text in transcribed
A car rental company provides three types of cars with the following daily prices Car Type Day Price Insurance (in OMR) Charge Salon 15 SUV 25 13 Van 1.5 The rental price for a car is determined based on the day price of the car and number of days according to the following formula: Rental Price = Insurance Charge x No. of Days > For example, if a customer wants to rent a Salon for five days, then the rental price is 1.1 x 15 X5 which is equal to 82.5. Write a program named rental.py that calculates the rental prices of a car. The program should take two inputs: the car type and the number of days a customer wants to rent a car. Your program should implement a programmer defined function that takes two parameters: the car type and the number of days. The function should return the rental price calculated based on the above formula. Use an if/elif statement to select the appropriate day price and insurance charge based on the car type. The output of your program should look like the following Enter the required car type .... Enter the rental period in days Renting a Van for 6 days will co Make sure to add the following comments to the beginning of our code # FileName : rental.py # Student ID : # StudentName: student name> Run and test your program. Once done, submit the file named rental.py at the link below

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

Whats the difference between an open-end mutual fund and an ETF?

Answered: 1 week ago

Question

2. How will the team select a leader?

Answered: 1 week ago