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
Which of the following represent emerging classes of application software? Check all of the boxes that apply.
soldi70 [24.7K]
Word processing and databases are the most common type of application software. In this case, application software, often called productivity programs, are programs designed to specifically attain specific tasks such as creating documents, databases, sending email, designing graphics and even playing games. A mobile app is also an emerging type of application software designed to run on portable devices like mobiles and PDAs. To some extent, email software is an application software since it can also be distinguished on the basis of usage.






7 0
3 years ago
Read 3 more answers
You are in the windows power shell window and decide to encrypt folder which of the following command do you use
aleksklad [387]

Answer:

try this script bro

(Get-ChildItem –Path C:\Folder).Encrypt()

Explanation:

simply microsoft just use encrypt() & decrypt() words in script to act doing the method encrypting & decrypting.

but i suggest you to use the windows gui features , its more easier. just right click on your folder target , go to properties then click advanced button , checklist encrypt box.

7 0
2 years ago
Network forensic analysis. A network forensic analyst is responsible for identifying worms, viruses, and infected nodes in the c
Phantasy [73]
<h3>What is Network forensics ?</h3>

Network forensics is the procedure of tracking packets and reading community site visitors hobby for intrusion or malware detection. It entails figuring out an issue, amassing and reading data, choosing the great troubleshooting response, and imposing it.

The probability distribution is 1.25.

Read more about the probability distribution:

brainly.com/question/24756209

#SPJ1

5 0
2 years ago
What is the scope of each variable?
kari74 [83]

Answer:

scope of pet name is limited to pet class and color is accessible to the whole program

Explanation:

4 0
3 years ago
Read 2 more answers
Paragraph: Read the following two e-mail messages. In three to five sentences, explain why E-mail B is the more appropriate work
exis [7]
E-mail B is the more appropriate workplace e-mail because it’s straightforward, polite, and professional. E-mail A was more accusatory and aggressive, and many people don’t like when they’re being yelled at or accused of something and, as a result, this person may start to dislike that coworker. However, the second e-mail was more polite and made the receiver think of them as a respectful person so that they’re happy to help them out.
4 0
3 years ago
Other questions:
  • Businesses sometimes achieve uninterruptible service by using a technology known as ____ to keep a mirror copy of all their data
    11·1 answer
  • Need Help !!! Please
    8·1 answer
  • Dustin runs a command at the command line trying to find out what kernel version the system is running. However, it doesn't give
    12·1 answer
  • If a table is designed so that every determinant is a candidate key, then that relation is in ________.
    14·1 answer
  • 1. If this traffic signal is turned on after the red light, it means you may cross the intersection, but you _______ wait until
    12·2 answers
  • SATCOM in the Ku- and Ka- bands, as well as EHF systems are adversely affected by rain (the higher the frequency, the greater th
    14·1 answer
  • Amy just added a 462 meter run of fiber optic cable to the network what should she do next?
    10·1 answer
  • Write a Comparator that compares String objects by the number of words they contain. Consider any nonwhitespace string of charac
    15·1 answer
  • Which DHCPv4 message will a client send to accept an IPv4 address that is offered by a DHCP server? (Points : 5) Unicast DHCPACK
    8·1 answer
  • Moving images of real event​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!