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
im try to search for question the search bar and is giving me a error message is the page having any technical problem?
aalyn [17]
I have been running into the same problem, they haven't said anything but that might be the case.
6 0
3 years ago
Tp-24 What should you do before starting an inboard gasoline engine
Minchanka [31]

Before starting an inboard gasoline engine, you should remove the engine cover completely to let the engine air out. Next is to change the fuel filter or the water separator. Marine fuel filters and water separators help draw water from the boat fuel, therefore protecting the motor from the water. If water were to get in, it could cause serious problems.

You should also consider changing the engine oil. This is especially so if the motor boat has been sitting around for a while. The fourth step is to change the oil filter. It is recommended that the oil filter is changed every 100 hours or every season. Other steps include;

Recharge the battery.

Refuel your boat.

Check the cooling system.

4 0
3 years ago
I am trying to go into my outlooks, email but it says. :-( Something went wrong You're currently signed in as ||my hotmail|| . P
Ksju [112]

Answer:

ok???

Explanation:

4 0
2 years ago
What is a safe practice when online?
lisabon 2012 [21]

Answer:

Safe work practices are generally written methods outlining how to perform a task with minimum risk to people, equipment, materials, environment, and processes

Explanation:

6 0
3 years ago
Create a program that receives the age of a user and determine whether he/she can vote or not. Assume the voting age to be 20. C
Varvara68 [4.7K]

Answer:

in what language?

python

```

while (1):

x = eval(input("What is your age?"))

if x>=20:

print("You can vote")

else :

print("You can't vote")

```

Explanation:

you get the user input for his age then you do an if statement to check if it is less or greater than 20 and print yes id it is =20 or bigger than 20 else you print no

7 0
3 years ago
Other questions:
  • 4. The same data source can be used multiple times in creating mail-merge documents.
    7·1 answer
  • Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and checki
    8·1 answer
  • The voluntary linkage of computer networks around the world is called the ______.
    7·1 answer
  • \What will the weather most likely be like the day after a warm front? (4 points) The temperature will be cool or cold, and ther
    7·2 answers
  • This device is used to connect sections of large networks?
    12·2 answers
  • A teacher wants to create a list of students in her class. Using the existing Student class in this exercise. Create a static Ar
    14·1 answer
  • What do you understand by the term polysome?​
    14·1 answer
  • How is geeking out related to the concept of social capital?
    5·1 answer
  • February 1995, Kevin Mitnick was arrested. While on parole was he allowed to have a phone or computer?
    6·2 answers
  • As a technical support rep, michael is responding to a customer's question sent to him via e-mail. what should michael's first t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!