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
HELP PLEASE NOW ASAP BRAINLIEST
charle [14.2K]
<span>Josie lives in an area where there are frequent power cuts. She should use a UPS (Uninterruptible Power Supply). It protects against damage to a computer's hard drive (data) in case of a sudden shutdown.

Hope this helps!</span>
7 0
3 years ago
Read 2 more answers
Which of the following is a group of email names and addresses used for mass distribution of a message?
Jet001 [13]

Answer:

Option D is the correct answer for the above question.

Explanation:

Email list (as the name suggests) is defined as the set of an Email address. It is also the group of address which is needs for message distribution because an Email address is the only necessary part to send the mail which is also called the message. When a user wants to send the mass Email or message then he needs a list of email which can be filled at the "TO" or "CC" or "BCC" part of the compose mail and it can be able to send the mass message.

The above question asked about the list which is useful for the mass message then the answer is an Email list which is stated from the option D. Hence option D is the correct answer while other is not because--

  • Option A states the actor list which is not required to send the mail.
  • Option B states the client list which is not required to send the mail.
  • Option C states the chat list which is not required to send the mail.
3 0
3 years ago
1) List at least five smaller behaviors you could break the complex behavior "brushing my teeth" into.
zhuklara [117]
Q1:
1. Go into the bathroom
2. Put toothpaste on the toothbrush
3. Place head of toothbrush on your teeth
4. Revolve in small circles
5. Repeat 4 for all of your teeth
6. Use water to wash away the toothpaste in you mouth
5 0
3 years ago
Read 2 more answers
Physical activity such as sports or even a brisk walk can help reduce
ycow [4]
Physical activity could help reduce the chance ofheart disease
4 0
3 years ago
Read 2 more answers
Write the steps of applying background colour to the document?​
krok68 [10]

Answer:

Select add color

Explanation:

depends the program u are using

7 0
3 years ago
Read 2 more answers
Other questions:
  • HEY DO U LIKE TRAINS!
    7·1 answer
  • MD5 uses a hash value to create a hash which is typically a 32 character hex number and how many bits?
    11·1 answer
  • Settings to control the amount of notifications is a
    10·2 answers
  • When a formula contains the address of a cell, it is called a(n) ________.
    15·1 answer
  • Write a CPP Program to read an integer number. Use a pointer to display this numbe
    5·1 answer
  • A new company will have 40 workstations in one building sharing a single network. All users must be able to share ¬les and print
    7·1 answer
  • Anyone wanna join zoo m???????​
    10·2 answers
  • When power is completely removed from your computer
    11·1 answer
  • What types of printed information are useful to obtain from your target employers?
    5·1 answer
  • Which backup requires a small amount of space and is considered to have an involved restoration process?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!