answer.
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]
1 year 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]1 year 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
A computer has 4 GB of RAM of which the operating system occupies 512 MB. The processes are all 256 MB (for simplicity) and have
Afina-wow [57]

Answer:

1-p^{14} = 0.99

p^{14}= 0.01

p =(0.01)^{1/14}= 0.720

So then the value of the maximum I/O wait that can be tolerated is 0.720 or 72 %

Explanation:

Previous concepts

Input/output operations per second (IOPS, pronounced eye-ops) "is an input/output performance measurement used to characterize computer storage devices like hard disk drives (HDD)"

Solution to the problem

For this case since we have 4GB, but 512 MB are destinated to the operating system, we can begin finding the available RAM like this:

Available = 4096 MB - 512 MB = 3584 MB

Now we can find the maximum simultaneous process than can use with this:

\frac{3584 MB}{256 MB/proc}= 14 processes

And then we can find the maximum wait I/O that can be tolerated with the following formula:

1- p^{14}= rate

The expeonent for p = 14 since we got 14 simultaneous processes, and the rate for this case would be 99% or 0.99, if we solve for p we got:

1-p^{14} = 0.99

p^{14}= 0.01

p =(0.01)^{1/14}= 0.720

So then the value of the maximum I/O wait that can be tolerated is 0.720 or 72 %

3 0
1 year ago
You are a network administrator for a large bagel manufacturer that has 32 bakeries located throughout the United States, United
Anni [7]

Answer:

See the components in explaination

Explanation:

In order to make it as IPv6, few key components should be supported, those components are given below:

The infrastructure must support the enhanced protocol StateLess Address Auto-Configuration (SLAAC).

Static addressing with DHCPv6, dynamic addressing with DHCPv6 and SLAAC are the methods used to configure the IPv6. The network administrator should able to understand and implement the IPv6 through the DHCPv6.

Other than the implementation, working of IPv4 and IPv6 are same. Therefore, the administrator need not to learn new information for its working.

As the IPv6 address length is 128-bit and purpose is for everything on line to have an IP address. It must allow the internet to expand faster devices to get internet access quickly.

The DHCPv6 is not supported by all windows. Therefore, network administrator should check the corresponding Operating system (OS) would support the DHCPv6 for IPv6.

The network administrator must have good knowledge and skills on the IPv6.

The above mentioned key components should be verified by the network administrator in order to support for IPv6 project with DHCPv6.

4 0
1 year ago
Which statement below correctly differentiates between frames and bits? Frames have more information in them than bits. Frames a
9966 [12]
<span>Frames have more information in them than bits.
</span>
<span>Frames are made up of bits but not vice versa.


A bit (BInary digiT) is the basic unit of digital. It can be 0 (logical false, off) or 1 (not logical false - true, on). Four bits are in a nybble, which can have a value of 0 - 15, eight bits are in a byte which can have a value of 0 - 255. Words vary in size, they consist of multiple bytes and are generally correlated with the system's data bus/processor data width (a 64 bit system has an 8 byte word).
</span>
5 0
2 years ago
Read 2 more answers
When Liam went to print his presentation, the boot process established the connection to the printer, sent the presentation to t
Mars2501 [29]

Answer:

b. False

Explanation:

When Liam went to print his presentation, the boot process established the connection to the printer, sent the presentation to the printer, and let other software know the printer was busy. It is a false statement.

6 0
2 years ago
An executive in a computer software firm works with his office door closed. At the same time every hour he opens the door to see
Masja [62]

Answer: (A) Fixed interval

Explanation:

 The fixed interval schedule is the type of schedule of the reinforcement in the operand conditioning in which the the initial response are rewarded by some specific amount of the time.

The main issue with the fixed interval schedule is that the people have to wait until the reinforcement schedule get occur and start their actual response of interval. This type of reinforcement schedule occur as the output value does not posses constant value all the time.

Therefore, Option (A) is correct.

4 0
2 years ago
Other questions:
  • Mechanical advantage is the ratio of the force required to move a load divided by______
    12·1 answer
  • Pls help me. ask yourself what would jesus do...
    14·1 answer
  • You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You
    11·1 answer
  • Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
    15·1 answer
  • 1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
    12·1 answer
  • Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the n
    13·1 answer
  • Assuming that the valid cost should be between 100 and 200, does the following code snippet test this condition correctly?
    10·1 answer
  • Define a new object in variable painter that has properties "name" storing "Vincent van Gogh"; "artworks" storing "The Starry Ni
    13·1 answer
  • Acceleration is the rate at which an object changes its velocity. It is typically represented by symbol a and measured in m/s2 (
    11·1 answer
  • JAVA Write a program that first asks the user to type a letter grade and then translates the letter grade into a number grade. L
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!