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]
2 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]2 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
Okay I need help. In the first picture, the black glasses, that was my vision last year 52:17 135 and my vision now is 52:15 135
Aleksandr-060686 [28]
Bbetter I think glasses are better this year but also the dates. your eyes over tim adjust to things like glasses to help see so when yu got better glasses it got better
3 0
2 years ago
Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit f
Artemon [7]

Answer:

The representation of 100.0 in the floating-point representation is computed as follows: First convert the given number 100.0 in the binary form. 10010 = 11001002 the binary representation.

Explanation:

3 0
2 years ago
A user logs into Active Directory on a workstation and the user home directory does not redirect to a network share on a file se
inysia [295]

Answer:

gpresult

Explanation:

Group Policy provides the system administrator with settings that would be necessary to manage the different user accounts available in an organization. It also controls their work environment centrally by configuring the user Operating System (OS), applications and user accounts.

Group policy settings or configurations are referred to as Group Policy Objects (GPOs). These objects can be linked to organizational units (OUs), domains or sites.

There are various group policy commands such as;

  1. rstrui (System Restore tool will run),
  2. runas (using different permission to run a tool or program),
  3. tasklist (currently running programs are shown
  4. gpupdate (Group policies are refreshed)
  5. gpresult (group policy configurations are displayed for verification)

gpresult command can be used to verify the group policy configurations for adjustment or optimization. The technician can start troubleshooting from viewing the active settings, then running the rstrui to start the System Restore utility to restore the computer to an earlier date

6 0
3 years ago
Rectangle perimeter is 72 .Find the new perimeter if length is doubled and breadth is tripled​
777dan777 [17]

Answer:

Is it related to technology and computers?

3 0
2 years ago
The procedure by which a process's state is saved before being swapped out of the cpu, then us restored to the state when the pr
belka [17]

The procedure is known as<u> context switching</u>.

In the field of computers, context switching can be described as a procedure in which a process is stored so that it can be executed at a later point. Such a procedure allows multitasking operations easier. A simple CPU can be utilized for multiple processes.

After a task is done, it can be swapped out of the CPU and can be restored later. By using context switching, more space can be provided on a CPU as freeing from one process will make space for the other.

When switching a process, the status of the older running process is saved on the CPU as registers.

Context switch makes it feasible to share one CPU for multiple procedures hence reducing the concerns that arise from using additional processors.

To learn more about context switch, click here,

brainly.com/question/21685677

#SPJ4

3 0
1 year ago
Other questions:
  • How is the Task Manager helpful in displaying which resources your computer is using and how fast?
    5·2 answers
  • How can you autohide the taskbar in Windows 10?
    8·2 answers
  • True or false? A medical assistant can check for available exam rooms and providers using an electronic scheduling system.
    8·1 answer
  • Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
    15·2 answers
  • Can find error , suppose to print what season it is and if fails : Traceback (most recent call last):
    11·1 answer
  • Write a program. in QBAsSIC
    13·1 answer
  • Which of the following best describes contextual design?
    10·1 answer
  • 1.Which one of the following buttons returns a window to its original size?
    11·1 answer
  • SINCE I CANT SEE IT KANG LOOK
    6·2 answers
  • HELP PLEASE
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!