subject

A car rental company has three types of cars for customers to choose. SUV: $55 per day for first 7 days. $47 per day starting from the 8th day. Minivan: $49 per day for first 7 days. $42 per day starting from the 8th day. Hybrid: $44 per day for first 7 days. $38 per day starting from the 8th day. Write a Python program to do the following. (a) [4 points] Ask user to choose car type. Enter S for SUV, M for minivan or H for hybrid. User may enter uppercase or lowercase letter. Both S and s should be accepted for SUV. Both M and m should be accepted for minivan. Both H and h should be accepted for hybrid. If an invalid car type is entered, display "Invalid car type" and ask the user to reenter repeatedly until a valid car type is entered. (b) [4 points] Ask user to enter number of days. Since user is expected to enter a whole number, it is safe to convert it to an integer. A minimum of 2 days rental is required. If number of days is smaller than 2, display "Must be at least 2 days" and ask user to reenter repeatedly until 2 or larger is entered. (c) [8 points] Calculate and display rental fee. The following is an example: Enter S for SUV, M for minivan, H for hybrid: x Invalid car type. Enter S for SUV, M for minivan, H for hybrid: F Invalid car type. Enter S for SUV, M for minivan, H for hybrid: m Enter number of days: 1 Must be at least 2 days. Enter number of days: 0 Must be at least 2 days. Enter number of days: 8 Rental fee: 385

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
You know the right answer?
A car rental company has three types of cars for customers to choose. SUV: $55 per day for first 7 d...
Questions
question
Mathematics, 31.07.2021 01:40
question
World Languages, 31.07.2021 01:40
question
Mathematics, 31.07.2021 01:50
question
Mathematics, 31.07.2021 01:50
Questions on the website: 13722363