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
sergij07 [2.7K]
3 years ago
6

Problem 1 Calculating the tip when you go to a restaurant is not difficult, but your restaurant wants to suggest a tip according

to the service diners receive. Write a program that calculates a tip according to the diner’s satisfaction as follows: •Ask for bill amount •Ask for the diners’ satisfaction level using these ratings: 1 = Totally satisfied, 2 = Satisfied, 3 = Dissatisfied. •If the diner is totally satisfied, calculate a 20 percent tip. •If the diner is satisfied, calculate a 15 percent tip. •If the diner is dissatisfied, calculate a 10 percent tip. •Report the satisfaction level and tip in dollars and cents Format tips to 2 decimal points; if the bill is 105$ and satisfaction level is 3, then the tip will be $10.50
Computers and Technology
1 answer:
DIA [1.3K]3 years ago
4 0

Answer:

bill = float(input("Enter the bill amount: "))

rating = int(input("Choose a rating: 1 = Totally satisfied, 2 = Satisfied, 3 = Dissatisfied.: "))

if rating is 1:

   tip = bill * 0.2

elif rating is 2:

   tip = bill * 0.15

elif rating is 3:

   tip = bill * 0.1

print("The rating is: " + str(rating))

print("The tip is: $%.2f" % (tip))

Explanation:

*The code is in Python

- Ask the user for the <em>bill</em> and <em>rating</em>

- Depending on the <em>rating</em>, calculate the <em>tip</em> using <u>if else</u> statement i.e. If the rating is chosen as 1, calculate the tip by taking 20 percent of the bill.

- Print the <em>rating</em> and the <em>tip</em>

You might be interested in
Can someone that been helping me answer one more question for please and thx
Gnom [1K]

Answer:

D

Explanation:

Federal Tax, not state

5 0
3 years ago
World pade is world processing software true or false​
Evgesh-ka [11]

Answer:

yes

Explanation:

5 0
2 years ago
Why are the keys on the qwerty keyboard arranged the way they are?
sveticcg [70]
Sholes arranged the keys in their odd fashion to prevent jamming on mechanical typewriters by separating commonly used letter combinations.
7 0
3 years ago
Green Fields Landscaping Company sells evergreen trees which are priced by height. Customers have a choice of purchasing a tree
Tomtit [17]

Answer:

Answered below

Explanation:

//Program is written in Python programming //language.

number_of_trees = int(input ("Enter number of trees purchased: "))

height_of_trees = float(input("Enter height of trees: "))

delivery_status = input("Do you want trees delivered? enter yes or no ")

price_of_two_meters = 20

total_price = number_of_trees * price_of_two_meters

//Invoice

print (number_of_trees)

print(height_of_trees)

print (total_price)

print (delivery_status)

8 0
3 years ago
The common channel signaling (CCS) system provides a separate network dedicated to control and signaling over the PSTN. This ena
dezoksy [38]
The correct answer is A.True
8 0
3 years ago
Other questions:
  • What types of scientific claims should be verified
    5·1 answer
  • A small company has hired you to take over its IT needs. The company currently has seven on-site employees and 12 remote employe
    12·1 answer
  • Using the __________ option, you can change the state of a model back to where a particular feature or features weren`t yet crea
    7·1 answer
  • Jenny is the project manager and her company. She needs to break her current project into parts that her employees can work on.
    10·1 answer
  • Howard is leading a project to commission a new information system that will be used by a federal government agency. He is worki
    7·1 answer
  • What is a short sequence of characters that appears at the end of a filename and is preceded by a period called __________
    5·1 answer
  • Why is a high-quality bond typically considered a lower-risk investment than a stock
    10·2 answers
  • Which of the following transfer rates is the FASTEST?
    15·1 answer
  • Select the correct answer.
    5·2 answers
  • HELP ME PLEASE 41 PTS
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!