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
Check all of the file types that a Slides presentation can be downloaded as.
GuDViN [60]

Answer:

.JPEG

.PDF

.pptx

General Concepts:

<u>Google</u>

  • Slides has an option to download a wide multitude of formats

Explanation:

If we go into File, and then under Download, we should be able to see which file types that a Slides presentation can be downloaded as.

Attached below is an image of the options.

4 0
3 years ago
Read 2 more answers
In order to prevent unauthorized access, how can the shadow file be configured to enforce a password policy?​ What happens to ac
NemiM [27]

Answer : The securtiy of the password can be maitained by the shadow files such as:-

  • max is for the days that represent that the same password can be used without the need for changing it  
  • min is for the days that represent waiting days before the changing of password after he/she gets a new password
  • warn are the days that come with Waring sign that the password is going to expire soon.

For a certain period of time , the user can access the log in when the password has expired . If that period is timed out then there will be no log in option and the account gets disabled.

4 0
3 years ago
Which of the following expressions is not equivalent to X ' ?
damaskus [11]

Answer:

the answer is going to be c

8 0
3 years ago
In computer science what are the methods used to protect the information stored by a piece of software called?
Nezavi [6.7K]

Answer:

cryptography

Explanation:

cryptography

In computer science, cryptography refers to secure information and communication techniques derived from mathematical concepts and a set of rule-based calculations called algorithms, to transform messages in ways that are hard to decipher

3 0
2 years ago
A(n) ____ is software that can be used to block access to certain Web sites that contain material deemed inappropriate or offens
serious [3.7K]

Answer: <em>Internet filter</em>

Explanation:

Internet filters are referred to as software which prevents individuals from accessing certain kind of websites. These filters are predominantly used in order to block content that might be considered inappropriate for some users. These filters are widely used in public library and computers used by schools and colleges.

4 0
3 years ago
Other questions:
  • Design a method for representing the state of a tic-tac-toe board in computer memory. can you fit your representation into three
    12·2 answers
  • The create_python_script function creates a new python script in the current working directory, adds the line of comments to it
    9·1 answer
  • ​PeroxyChem's IT staff was able to free its IT staff to spend less time on routine maintenance and more time on strategic tasks
    11·1 answer
  • Your company runs several databases on a single MySQL instance. They need to take backups of a specific database at regular inte
    12·1 answer
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • MULTIPLE CHOICE QUESTION PLEASE HELP!!!!!!!!!
    14·2 answers
  • What technique involves graphical methods and nontechnical language that represent the system at various stages of development a
    14·1 answer
  • _____ interviews rely on scenarios and reflections to evaluate an applicant’s skill set.
    9·2 answers
  • Once the CPU has fetched the data requested, what are the next steps in the process?
    15·1 answer
  • Write a program that will remove "May" from the list using .Pop and .Index methods.(5pts) GIVEN: lst=["January", "February", "Ma
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!