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
Paha777 [63]
3 years ago
15

(1) Output a menu of automotive services and the corresponding cost of each service. (2 pts) Ex: Davy's auto shop services Oil c

hange -- $35 Tire rotation -- $19 Car wash -- $7 Car wax -- $12
(2) Prompt the user for two services from the menu. (2 pts) Ex: Select first service: Oil change Select second service: Car wax



(3) Output an invoice for the services selected. Output the cost for each service and the total cost. (3 pts) Davy's auto shop invoice Service 1: Oil change, $35 Service 2: Car wax, $12 Total: $47



(4) Extend the program to allow the user to enter a dash (-), which indicates no service. (3 pts)



Ex: Select first service: Tire rotation Select second service: - Davy's auto shop invoice Service 1: Tire rotation, $19 Service 2: No service Total: $19



Has to work in Python 3
Computers and Technology
1 answer:
Wittaler [7]3 years ago
3 0

Answer:

service1_cost = 0

service2_cost = 0

print("Davy's auto shop services")

print("Oil change -- $35, Tire rotation -- $19, Car wash -- $7, Car wax -- $12")

service1 = input("Select first service: ")

service2 = input("Select second service: ")

if service1 == "Oil change":

   service1_cost = 35

elif service1 == "Tire rotation":

   service1_cost = 19

elif service1 == "Car wash":

   service1_cost = 7

elif service1 == "Car wax":

   service1_cost = 12

elif service1 == "-":

   service1 = "No service"

   service1_cost = 0

if service2 == "Oil change":

   service2_cost = 35

elif service2 == "Tire rotation":

   service2_cost = 19

elif service2 == "Car wash":

   service2_cost = 7

elif service2 == "Car wax":

   service2_cost = 12

elif service2 == "-":

   service2 = "No service"

   service2_cost = 0

print("- - -")

print("Davy's auto shop invoice")

print("Service 1: " + service1 + " costs $" + str(service1_cost))

print("Service 2: " + service2)

print("Total: $" + str(service1_cost + service2_cost))

Explanation:

- Initialize the variables for cost values

- Ask the user for the services

- Depending on the user choice, calculate the cost of each service using if else structure

- Print the chosen services, cost of each service and total cost    

You might be interested in
Telecommunications is the transmission of voice and video as well as data and usually implies transmitting a longer distance tha
saul85 [17]

Answer:

The correct answer to the following question will be "True".

Explanation:

  • Telecommunication seems to be the transmitting by cable, antenna, optical or other electromagnetic networks of signs, commands, letters, words, texts, pictures, and sounds, or knowledge of any kind.
  • This happens when the use of technologies involves the information exchange between participants in the conversation.

Therefore, the given statement is true.

6 0
2 years ago
A database stores a large amount data in vertical ___
myrzilka [38]

Records for the first one and table for the second one

4 0
3 years ago
How to select multiple lines in mysql workbench and right shift
Alekssandra [29.7K]

Answer:

I'dont really know the answer

4 0
2 years ago
Rapunzel s-a născut într-un ţinut îndepărtat într-un regat necunoscut. Mama vitregă a închis-o pe Rapunzel într-un turn foarte î
andrey2020 [161]
Iche hebie zaft no guts dude
5 0
3 years ago
How can getchar function be used to read multicharacter strings?​
alex41 [277]

69696969696969969696969696966969696969696V69696969696969969696969696966969696969696VVVV696969696969699696969696969669696969696966969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696V6969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696VVVV696969696969699696969696969669696969696966969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696V6969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696VVVV696969696969699696969696969669696969696966969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696V69696969696969969696969696966969696969696

5 0
3 years ago
Other questions:
  • How to select the entire table in microsoft excel
    11·1 answer
  • A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.
    14·1 answer
  • This operator represents the logical AND.
    7·1 answer
  • State whether true or false.
    6·1 answer
  • What takes information entered into a given system and sends it automatically to all upstream systems and processes?
    6·2 answers
  • Write a Python program that reads the CSV file, compares the population estimates of every row for 2010 and 2017 and computes th
    10·1 answer
  • 1. True or false: The more pixels per inch in an image, the higher the resolution is. (1 point)
    8·1 answer
  • MULTIPLE CHOICE:
    15·1 answer
  • Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value w
    11·1 answer
  • What are the differences between a cursor, insertion point and mouse pointer?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!