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
stiv31 [10]
3 years ago
12

Write a program to calculate how much to tip a waiter person based on the quality of service. The script file should ask for the

amount of the check and whether the service was good, fair or poor. If the service was good, the tip should be 20%. If the service was fair, the tip should be 15%. If the service was poor, the tip should be 5%. The program should display the tip and the total of the check including the tip.
Computers and Technology
1 answer:
IgorC [24]3 years ago
5 0

Answer:

Since Python is a scripting language, here is code in python.

#prompt user to give check

amount=float(input("Please Enter the check:"))

#prompt user to give service

service=input("Please Enter the service (good, fair or poor):")

# calculate tip on the basis of service

if service =="good":

   tip=amount*0.2

elif service=="fair":

   tip=amount*0.15

elif service=="poor":

   tip=amount*0.05

#calculate total

total=amount+tip

#print tip

print("tip is equal to : {} ".format(tip))

#print total

print("total of the check is : {} ".format(total))

Explanation:

Prompt user to give check and service input.After taking the input from user, based on the service tip will be calculated. if service is "good" then tip will be 20% of the check, tip will be 15% if service is "fair" and tip will be 5% if service is "poor".

Output:

Please Enter the check:125                                                                                                

Please Enter the service (good, fair or poor):good                                                                        

tip is equal to : 25.0                                                                                                    

total of the check is : 150.0

You might be interested in
It is manadatory to include a banner marking at the top of the page to alert the user that cui is present.
ololo11 [35]
A. True is the right answer
6 0
3 years ago
Read 2 more answers
The weird suspicious box that k12 sends the parents to put on the router. im getting strange privacy error messages on google an
lorasvet [3.4K]

Answer:

34

Explanation:

WHY BECAUSE 34 IS PRIME AND THIS PROBLEM REDUCE THE NUMBER AND CHANGE THE NUMBER INTO A MIXED NUMBER

7 0
3 years ago
A user states that when they power on their computer, they receive a "Non-bootable drive" error. The user works with external st
laila [671]

Answer:

B. Device boot order

Explanation:

The Device boot order makes a list of all the possible devices a system should check to in the operating system's boot files, as well as the proper sequence they should be in. Removable devices, hard drives, and flash drives are some devices that can be listed in the device boot order.

For the user whose computer displays a 'non-bootable drive' error, the device boot order would check all the devices listed to attempt booting from any of them. These devices might be in the order of removable discs, CD-ROM, hard drive. If all the options do not work, the computer would then do a Network boot. The order in which the devices are listed can be altered by the user.

8 0
4 years ago
About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms.
Genrish500 [490]

Answer:

(a) Q = (M-(1-n)S)/n

(b)    

When M = 450,

       Q = 82

       % CPU time wasted = 8.889%

When M = 90,

       Q = 10

       % CPU time wasted = 44.44%

When M = 50,

       Q = 2

       % CPU time wasted = 80%

Explanation:

Given  Data:

n = process

T = ms time

Context switch time overhead = S

and M is total overhead

See attached file for the calculation.

8 0
3 years ago
what component of virtualization controls all physical memory, and thus has the ability to make any unused memory pages in each
svlad2 [7]

Since the hypervisor, a component of virtualization, is in charge of managing all physical memory, it can make any memory pages left over in each guest virtual machine available to other virtual machines or the host computer.

<h3>What Exactly Is A Hypervisor?</h3>

A hypervisor is a class of computer software, firmware, or hardware that builds and manages virtual machines (also known as a virtual machine monitor, VMM, or virtualizer). A host machine is a computer on which a hypervisor is running one or more virtual machines, and a guest machine is a specific virtual machine. The hypervisor controls how the guest operating systems are executed and provides them with a virtual operating environment. The visitor often uses the native hardware to carry out instructions, unlike an emulator. The virtualized hardware resources may be shared by several instances of various operating systems. For instance, Linux, Windows, and macOS instances can all operate on a single real x86 computer. Contrastingly, with operating-system-level virtualization, each instance (often referred to as a container) only needs to share a single kernel, while the guest operating systems—such as various Linux distributions using the same kernel—can differ in user space.

To know more about Softwares, visit:

brainly.com/question/1022352

#SPJ4

6 0
1 year ago
Other questions:
  • A geologist is part of what career feild
    6·1 answer
  • How do you open Microsoft Excel 2013 with Windows 8?
    13·1 answer
  • A stop sign is an example of?
    11·2 answers
  • What type of Internet monitoring technique records information about a customer during a web surfing session, such as what websi
    8·1 answer
  • Steps in the systems development life cycle​
    15·2 answers
  • identify at least three additional ethical responsibilities expected from a computer professional. In brief, explain each respon
    11·1 answer
  • Emma lives in Pennsylvania, what climate does she live in?
    7·1 answer
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • A user input is when the user interacts with the program by typing.<br> True<br> False
    11·2 answers
  • What are the concerns surrounding 5G cellular networks?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!