subject
Engineering, 28.02.2020 03:52 brandon56238

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 another example:

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 Β°f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
An ideal otto cycle with air as the working fluid has a compression ratio of 8. the minimum and maximum temperatures in the cycle are 300 k and 1340 k. use constant specific heats at room temperature to determine (a) the amount of heat transferred to the air during the heat- addition kj/kg, (b) the thermal efficiency, and (c) the thermal efficiency of a carnot cycle ope limits. process, in rating between the same temperature
Answers: 2
question
Engineering, 04.07.2019 18:20
Steam enters a converging nozzle at 3.0 mpa and 500Β°c with a at 1.8 mpa. for a nozzle exit area of 32 cm2, determine the exit velocity, mass flow rate, and exit mach number if the nozzle: negligible velocity, and it exits (a) is isentropic (b) has an efficiency of 94 percent
Answers: 2
question
Engineering, 04.07.2019 18:20
Air is compressed isentropically from an initial state of 300 k and 101 kpa to a final temperature of 1000 k. determine the final pressure using the following approaches: (a) approximate analysis (using properties at the average temperature) (b) exact analysis
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, 23.09.2019 03:50
question
Mathematics, 23.09.2019 03:50
question
Biology, 23.09.2019 03:50
question
Spanish, 23.09.2019 03:50
question
Physics, 23.09.2019 03:50
Questions on the website: 13722360