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
Which finger has two number keys to type instead of just one?.
nexus9112 [7]
A method taught since the 1960s (and perhaps earlier): The left little finger is used for the keys 1 2 , the ring finger for 3 , the middle — 4 , the left index finger is responsible for 5 and 6
4 0
3 years ago
Tests that replace_punctuation() replaces 1 exclamation point and 2 semicolons in "we'll continue our quest in space. there will
lyudmila [28]

Answer:

def replace_punctuation(input_str,exclamationCount =0,semicolonCount=0):

   result=''

   for i in input_str:

       if i=='!':

           i='.'

           exclamationCount+=1

       elif i==';':

           i=','

           semicolonCount+=1

       result+=i

   print('Punctuation replaced')

   #displaying replaced values counts

   print('exclamationCount:',exclamationCount)

   print('semicolonCount:',semicolonCount)

   return result

Explanation:

5 0
4 years ago
Why does my wifi keep disconnecting and reconnecting?
jeka57 [31]

Answer:

get a beter rouour

Explanation:

v

4 0
3 years ago
a limited-access expressway. A)allows vehicles to enter or exit only at certain place.B) does not permit trucks or buses.C)has n
zepelin [54]
Hello babe I just wanted to say hello
3 0
3 years ago
6. 6. While printing a document, what are the options available in the Settings section?
elixir [45]

Answer:

The answers to questions is given below in explanation section

Explanation:

6.6:

While printing a document, the following options are available in setting sections.

Document

In this section the following setting options are available:

  • Print All Pages: This option is selected if you want to print all pages in document
  • Print Selection: This option is printing a section in a document
  • Custom Print: Allow custom print
  • Document Info: print document information
  • List of Markup: print all the listed markups
  • Print Markup: print mark up in your document
  • Only print odd pages: Print odd pages in document
  • Only print even pages: Print even pages in document
  • Pages: In this option, you can provide custom pages to print i.e. combination of both odds and evens. e.g. 1-5,7,9,10-12. This will print page 1 to 5, the print page 7 and 9, and then print page 10 to 12.
  • Print one sided: if you want to print on one side of paper
  • Manually print on both sided: if you want to print both sides of the paper
  • Collated: If you want to print more than one copy, then this option will print all document and then start printing from first page to last page and continue to your number of print copies.
  • Uncollated: If you print 3 copy of document, this option will start printing first page 3 times, then second page 3 times and so on.

<em>Orientation</em>

  • Portait Orientation: this option is used for printing portrait page
  • Landscape orientation: this option is used to print on landscape of page

  • Page size: in this option, you can select different page sizes for printing.
  • Margins: This option allow you to set the margin of your printing page
  • Pages per sheet: This option allow you to print multiple page per sheet.

Answer (7)

A cell is an intersection between row and column in Excel on a spreadsheet. A cell in Excel starts from A1. A cell can contain different types of values for example string values, date values, text values, and numerical values, etc.

Cell also contains a reference to other cells in a spreadsheet.

To insert the value into a cell, first you have to select the particular cell, then click on it, and then enter a value in it. If you want to modify the cell value. for example, you may wrongly enter the number, 23456 instead of 24456. Then you may edit it in the formula bar because if you directly selected the cell, and start inserting value, you cant and you may lost the cell values.

Answer (8)

The following options are available in the Insert Cells Dialog Box.

To appear the insert cells dialog box, click any particular cell, where you want to insert the cell. Then click right-click, a window will open, in it, you can select the insert cell option. As you click on this option, a dialog box will appear with the following option.

  • Shift Cell Right: It will shift the selected cell to the right
  • Shift Cell Down: It will shift the selected cell to left
  • Entire Row: It will insert row below the selected cell
  • Entire Column: It will insert the column to the right of the selected cell

Answer (9)

Border and Shading dialog box appears after inserting a table. Insert table in a document, then select the table and right-click on it, then click on the table properties. A new dialog box will appear, in under table tab at the bottom, border and shading button is shown. Click on this button, as you click this button, Border and Shading dialog box will appear. In this option, you have different settings for the border.

Border: under this option, you can select different border style, color, and width for table, text, paragraph, and cell.

Page Border: In this option, you can select different border styles, border sizes, border arts and apply these to all documents or sections of the document. In this option, you have different settings for the border.

Shading: In this option, you can fill the table with color and also you can apply different patterns with color.

Answer (10):

The default orientation in MS word is portrait. Using this layout, the width of the document is smaller than the height of the document.

Answer (11)

The difference between the print layout and outline is given below:

  • The print layout shows the document in a way that how it would look like after printing, while outlook layout doesn't show how your document looks like on the page
  • In print layout, you can easily customize and modify your document, while in the layout you need to adjust the layout of the document and it is hard to do that
  • In print layout, you can easily adjust while inserting a new line while in layout it is quite difficult and each line is inserted with a bullet.
  • The print layout shows how the final print of the document looks like while the outline layout only shows the outlines of the document. Outline layout makes possible to collapse and expand different sections of the document to easily move blocks of text around the document. It is useful when you are looking at a document that has a large number of pages and sections.

Please find the rest of the solution is in attached word document.

Download docx
5 0
4 years ago
Other questions:
  • When you see a blank pointer this means you can drag the row or column border to change height or width
    14·1 answer
  • Nathan notices his computer System is slowing down when he tries to copy documents to it he also gets a prompt I warned him that
    7·1 answer
  • 5. RAM IS YOUR SYSTEM’S-
    14·2 answers
  • Shelly tells a friend that her computer needs to be fixed because it has been producing a lot of heat and is smoking. Where is t
    10·1 answer
  • Can you give me a long list of kid's cartoons
    15·1 answer
  • A(n) _____ can replace many applications with one unified set of programs, making the system easier to use and more effective.
    8·1 answer
  • Do you get notified if someone follows you on Spotify like your email or do you just have to find out on your own
    14·1 answer
  • How do you change the number of rows and columns displayed for an embedded Excel object on a PowerPoint slide?
    8·1 answer
  • Update thejavafile names to include your initials at the end, send .java file only.1. Completein-place heapSort, which takes an
    11·1 answer
  • What is a list of things we use programming for??? longest gets brainly
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!