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, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
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, 29.10.2020 01:00
question
French, 29.10.2020 01:00
question
Chemistry, 29.10.2020 01:00
Questions on the website: 13722361