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
The "edit" command must allow the user to find a record in the list by director. If there are multiple records with the same dir
sveticcg [70]

Answer:

To allow user to assign rating

Explanation:

The basic function of “rate” command is to give opportunity to the user to assign a value to a song from the range of 1 – 5.

In the range, the value of 1 indicates the lowest rating, while value of 5 is the highest rating that can be obtained.

Any previous ratings are then replaced by the new rating assigned from the range of 1 – 5.

7 0
3 years ago
if ur parent gets mad at u and says something then u say something, why do they say "stop back talking'' if ur just starting a c
Y_Kistochka [10]

Answer:

ummm what does this have to do with school work?

Explanation:

5 0
3 years ago
Read 2 more answers
To avoid legal issues and set clear guidelines and expectations for employees, employers should put which of the following in pl
Mademuasel [1]

Answer: social media policy

Explanation:

In order to avoid legal issues and also set clear guidelines and expectations for the employees in an organization, it is required that employers should put a social media policy in place.

A social media policy refers to a document which outlines how an organization and the employees will behave and conduct themselves online. This helps to checkmate and curtail the activities of the employees so that there won't be a detrimental effect on the organization.

8 0
3 years ago
A specialized storage device or group of storage devices that provides centralized fault-tolerant data storage for a network____
gogolik [260]

Answer: NAS(Network-attached storage)

Explanation:

NAS(Network-attached storage) is the file storage in computer server which links to computer network. It is used by heterogeneous client or group of other various users to access files data.

  • It can retrieve data from shared folder storage in network.It can provide serving file feature through standard, hardware,configuration or  software.
  • It provides high speed service of sharing and serving files, continuous work in faulty situation, easy configuration, simple accessing of data etc.

5 0
3 years ago
Technology, by itself is neither good nor bad.<br> A) true<br> B) false
sukhopar [10]

Answer:

true

Explanation:

I'm pretty sure it's true. I took coding class and something similar came up, but not 100% sure tho

8 0
3 years ago
Read 2 more answers
Other questions:
  • It is safe to stand on the top step of a ladder provided it is braced property
    10·1 answer
  • what is the gpa(grade point average) you need to have or you get kicked out of robotics for middle school?
    7·2 answers
  • Technology can help governments handle economic emergencies, such as the reliance on automation. Crop and resource shortages. Th
    15·2 answers
  • Three of the most important jobs of security management are to ensure _____ are organized according to sensitivity, ensure that
    10·1 answer
  • This problem has been solved!
    8·1 answer
  • Green field country is planning to conduct a cricket match between two teams A and B. a large crowd is expected in the stadium a
    6·1 answer
  • A program uses two classes: dog and poodle. which class is the base class and which is the derived class?
    7·2 answers
  • In this exercise, you will get some practice with the __add__ method by implementing it for a class called ContactBook. This cla
    12·1 answer
  • If every company is now a technology company, then what does this mean for every student attending a business college
    8·1 answer
  • A(n) _________ Web page displays customized content in response to keyboard or mouse actions or based on information supplied di
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!