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
When a support agent does not know the answer to a question, a good incident management strategy is to tell the user ____.
laiz [17]

When you don't know the answer to a question, a good incident management strategy is to tell the user that you'll research the question and get back to him or her.

<h3>What is incident management?</h3>

Incident management can be defined as a strategic process through which a business organization or company identifies, analyzes, and correct hazards, so as to ensure that normal service operation is restored as quickly as possible to end users after a disruption, as well as to prevent a re-occurrence of these hazards in the future.

As a support agent, if you don't know the answer to a question, a good incident management strategy is to tell the user that you'll research the question and get back to him or her at a latter time.

Read more on incident management here: brainly.com/question/11595883

4 0
2 years ago
What animal is perry the platypus ​
valkas [14]

Answer: Agent P or simply Perry

Explanation:

4 0
3 years ago
Read 2 more answers
Who wants to give free points to me?
Bad White [126]

Answer:

I can :) just comment lol

3 0
3 years ago
Read 2 more answers
Several students are making presentations for a science class. The chart describes the concept that each student will present to
Sedbober [7]

Question

Student presentation concepts from another source

Letitia - a step-by-step process of breaking down glucose into energy

Mana - repeating process of the steps of the cell division, going from interphase to division, and back to interphase.

Paul - a series of organisms that show similar characteristics and compare them to those that do not

Which best describes the SmartArt graphic layout each student should use?

Answer:

Letitia would use a process, Maria would use a cycle, and Paul would use a relationship.

Explanation:

Letita's assignment requires her to show how glucose can be broken down into energy, this requires a series of steps in s linear fashion, meaning it would be best suited to a process-style diagram.

Marta's project involves showing the steps of the cell cycle: the clue is in the name. This process is not linear, and instead repeats itself, meaning it fits to a cycle diagram (i.e. a circular diagram)

Paul is comparing and contrasting different organisms. Therefore, he should use a relationship diagram to show shared characteristics as well as features that differ.

4 0
3 years ago
Helllp me you will git 16 points
siniylev [52]

Answer:

False

Hope it helps...

Have a great day :P

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following is NOT an example of input?
    8·1 answer
  • It is okay to use a dust rag when cleaning the inside of a computer.
    9·2 answers
  • The term load is often used to describe opening a page in a ____. Answer
    11·1 answer
  • A. True
    8·1 answer
  • pWhat macOS system application tracks each block on a volume to determine which blocks are in use and which ones are available t
    14·1 answer
  • Which is used to identify the network portion and the host portion of an ip address?
    6·1 answer
  • When entering information for a new contact in the address book, Outlook will automatically create a _____. A. Invitation B. Res
    7·1 answer
  • Using a tag, set the color to orange for all tags
    13·2 answers
  • Write a HTML program as shown in the output.​
    9·1 answer
  • How do you initiate a sprite’s actions in a scene?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!