1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natali [406]
3 years ago
10

(1) Prompt the user for an automobile service. Output the user's input. (1 pt) Ex: Enter desired auto service: Oil change You en

tered: Oil change (2) Output the price of the requested service. (4 pts) Ex: Enter desired auto service: Oil change You entered: Oil change Cost of oil change: $35 The program should support the following services (all integers): Oil change -- $35 Tire rotation -- $19 Car wash -- $7 If the user enters a service that is not l
Computers and Technology
1 answer:
Pavlova-9 [17]3 years ago
6 0

Answer:

In Python:

#1

service = input("Enter desired auto service: ")

print("You entered: "+service)

#2

if service.lower() == "oil change":

   print("Cost of oil change: $35")

elif service.lower() == "car wash":

   print("Cost of car wash: $7")

elif service.lower() == "tire rotation":

   print("Cost of tire rotation: $19")

else:

   print("Invalid Service")

Explanation:

First, we prompt the user for the auto service

service = input("Enter desired auto service: ")

Next, we print the service entered

print("You entered: "+service)

Next, we check if the service entered is available (irrespective of the sentence case used for input). If yes, the cost of the service is printed.

This is achieved using the following if conditions

For Oil Change

<em>if service.lower() == "oil change":</em>

<em>    print("Cost of oil change: $35")</em>

For Car wash

<em>elif service.lower() == "car wash":</em>

<em>    print("Cost of car wash: $7")</em>

For Tire rotation

<em>elif service.lower() == "tire rotation":</em>

<em>    print("Cost of tire rotation: $19")</em>

Any service different from the above three, is invalid

<em>else:</em>

<em>    print("Invalid Service")</em>

<em></em>

You might be interested in
Rtjfifjjir<br> jhjjbkjkjjgggjhvhjvhf
V125BC [204]
Skakskdnsmakakkskzskskslslskakidfjjfueiskxncjowkcnjsosldnxnxisoszmsmzkakaskzkkz 浜はまはまはたはまりまる
6 0
2 years ago
If parties in a contract are not ____, the contract can be canceled.
Anastasy [175]
Agreed to all the terms mentioned in the contract
5 0
3 years ago
PLEASE HELP ME!!!!
White raven [17]
The answers are D and A
5 0
2 years ago
Read 2 more answers
1 Which one of the following is a transmission
ElenaW [278]

Answer:

d

Explanation:

All of the above can be means by which signals or information is transferred.

5 0
2 years ago
You want to create a watermark image. Which tab on the Format Picture box would you use?
Marianna [84]
You should use Picture tab
8 0
3 years ago
Other questions:
  • Airbags only absorb the _____ impact in a crash. initial final mid-stage smallest
    13·1 answer
  • Which javascript method should you use if you want to specify a message string to appear on your web page as it loads?
    13·1 answer
  • To create a button that will allow a user to send the form data to the server you use a type of ____
    5·1 answer
  • What are 7 good facts on Computer Viruses?
    10·1 answer
  • Assign the size of userInput to stringSize. Ex: if userInput is "Hello", output is: Size of userInput: 5
    7·1 answer
  • What should you do if your computer is running slower
    12·1 answer
  • Each bolt diameter in the standard system can have one of two thread pitches, or UNE.​
    10·1 answer
  • Many phone fraud scammers are expessily cunning because they approach the target to try to sell
    9·1 answer
  • IM a bit confused on what this is asking for exactly.
    14·1 answer
  • Can anyone figure this out???? I need help ASAP!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!