Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please help me solve this problem in python? Description For this program, you should prompt the user for an automobile service and a

image text in transcribed

can you please help me solve this problem in python?

Description For this program, you should prompt the user for an automobile service and a payment amount and then calculate how much change the user should receive, according to this list of services: oil change - $ 35 tire rotation - $ 19 . car wash - $7 If the user selects a service not shown in the list, you should display an appropriate message. Also, if the payment is not enough to cover the service an appropriate error message should be displayed. To complete this program, consider the following incremental process. (1) Prompt the user for an automobile service. After that, prompt the user for the payment amount. Don't forget to add a newline after each prompt. Then output the user's input as follows: Ex: Enter desired auto service: oil change You entered: oil change How much are you paying? 41 You have paid: $ 41 (2) Next, output the price of the requested service and the change amount as follows: Ex: Enter desired auto service: oil change You entered: oil change How much are you paying? 41 You have paid: $ 41 Cost of oil change: $ 35 You are getting $ 6 change back from your $ 41 . (3) Implement the error messages: If the user enters a service that i not listed above, then output the following error message: Error: Requested service is not recognized If the user enters a payment less than the service cost, then output an error message like this: Error: Your paid amount is not sufficient for the oil change service Don't forget to output the corresponding service name oil change/tire rotation/car wash) as well. Once you have received 100%, for extra practice, try to change the program so that the output has the dollar sign right next to the cost instead of having a space between them. Again, zyBooks will retain your highest score, so there is no harm in experimenting with other ways to solve the problem, or change it slightly to get extra practice

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

1. Television more Over watching faceing of many problems ?

Answered: 1 week ago

Question

Is there a link between chronic stress and memory function?

Answered: 1 week ago

Question

2 What people-related issues do you foresee?

Answered: 1 week ago