7–1 rental car write a program that asks the user what kind of rental car they would like print a message about that car such as let me see if I can find you a Subaru
Added by Brittany L.
Step 1
You can use any programming language, but for this example, we will use Python. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Create a simple application for a car rental company. The program should allow the user to choose a car style (compact, standard, or luxury) and a number of days (1 through 7). After the user makes selections, display the total rental charge, which is $19.95 per day for a compact car, $24.95 per day for a standard car, and $39.95 per day for a luxury car. Use the controls that you think are best for each function. Label items appropriately and use colors to achieve an attractive design. Take note that the different prices provided for the different car styles are constant values. Save the project as CarRental.
Akash M.
Write a Python script that will compute and display information for a company which rents vehicles to its customers. For a specified customer, the program will compute and display the amount of money charged for that customer's vehicle rental after prompting the user to enter the following four items for a given customer (in the specified order): - The customer's classification code (a character either B, D, or W) - The number of days the vehicle was rented (an integer) - The vehicle's odometer reading at the start of the rental period (an integer) - The vehicle's odometer reading at the end of the rental period (an integer) The program will compute the amount of money that the customer will be billed, based on the customer's classification code, number of days in the rental period, and number of miles driven. The program will recognize both uppercase and lowercase letters for the classification codes. - Code 'B' (budget) base charge: $40.00 for each day. Mileage charge: $0.25 for each mile driven. - Code 'D' (daily) base charge: $60.00 for each day. Mileage charge: no charge if the average number of miles driven per day is 100 miles or less; otherwise, $0.25 for each mile driven above the 100 mile per day limit. - Code 'W' (weekly) base charge: $350.00 for each week. If the car is kept less than 7 days, then $350.00 is still charged. For rental periods more than 7 days, the base charge is $350 per 7 days and $70 for any days making a fraction of a week (i.e. 9 days means $350 + 2 * $70 = $490). Mileage charge: no charge, this rental comes with unlimited miles. After calculating the bill, use formatted output to output the total bill with 2 decimal places of precision. Use an appropriate phrase for the output.
20 points Ask the use for the name of a car maker. Display the oldest and newest car from that maker. Modify your display to include the VIN of the car. Format the output in columns of 15, 25, 5, and 18. Test Case 1 What car make are you looking for? Toyota Oldest Toyota Toyota Xtra 1992 1GD021EG8FZ871072 Newest Toyota Toyota Venza 2013 JTEBW3EH1A2675008 Test Case 2 What car make are you looking for? Chevrolet Oldest Chevrolet Chevrolet Corvette 1953 1FTSW3A57AE184602 Newest Chevrolet Chevrolet Colorado 2012 WAUDFAFC5EN541608 Test Case 3 What car make are you looking for? BMW Oldest BMW BMW M3 1995 1G6AM5S36E0279137 Newest BMW BMW M3 2012 JTDKN3DP9E3223565 Test Case 4 What car make are you looking for? Kia Oldest Kia Kia Sportage 1996 SCFEBBCF3CG884167 Newest Kia Kia Soul 2012 YV4902BZ9E1254996 Test Case 5 What car make are you looking for? GMC Oldest GMC GMC 1500 Club Coupe 1992 1G6AU5582F0483799 Newest GMC GMC Sierra 1500 2013 3N1CE2CP0FL802517
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD