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
Computer operates nearly 100% accurately but why is the phrase'garbage in garbage out'(GIGO) associated with their use?Describe
k0ka [10]

Answer:

A program gives inaccurate results due to inaccurate data provided because a computer will always attempt to process data given to it. Said another way, the output quality of a system usually can't be any better than than the quality of inputs.

Explanation:

Techopedia Explains Garbage In, Garbage Out (GIGO)

<h3>Mark me a brainlist</h3>
8 0
3 years ago
-Another question involving microsoft word-
Alexus [3.1K]
I'm PRETTY, certain it's C.
5 0
3 years ago
The next generation ip version and successor to ipv4 is called what? ipv5 ipv6 iana ssl
Olenka [21]
I study IT,it was Ipv 6 in our textbook
4 0
4 years ago
What is an example of value created through the use of Deep Learning?
Leya [2.2K]

Answer:

B. reducing multi-language communication friction in a company through automatic language translation.

Explanation:

Deep learning is a branch of artifical intelligence whereby computer systems are programmed to operate in such a way they imitates tbe functioning of the human brain. Hence, emplyins network of neurons structures to learn, gain insight and make predictions. Using layers of network architectures, deep learning in predictive, including facial recognition, virtual assistants, language translation and many more. Deep learning is able to create value not by abrogating humans from the work fold but by enhancing and bridging the gap in areas which need the leverage of technology such as language translation as it enables individuals with different language prowee to be able to communicate through automatic translation.

5 0
3 years ago
How did early games in generation 1 or 2 influence zelda botw
Novay_Z [31]

Answer:

Open world exploration and inventory management

Explanation:

In the first Zelda game (NES) and Zelda ii (NES) there were very early open world mechanics along with inventory management.

5 0
3 years ago
Read 2 more answers
Other questions:
  • To change the tab order in which fields are encountered on a form, click the tab order button on the ____ tab.
    15·1 answer
  • Which of the following mountain ranges stretches from Alabama to Canada?
    10·1 answer
  • Which option of the Auto Correct tool enables you to add and delete words that do not follow abbreviation rules?
    11·2 answers
  • 10 POINTS! Janis is the only person who can respond to customer inquiries in her small travel company. She receives several cust
    14·2 answers
  • What type of network component is Telnet?
    10·2 answers
  • In some employment situations, not all personnel can immediately evacuate a work area per the eap. it may be that some equipment
    15·1 answer
  • How do you send friend requests?
    8·1 answer
  • how do i create a program in little man computer that takes 2 numbers, divides them and then outputs the div and mod?
    8·1 answer
  • Please help!
    6·1 answer
  • Which original VPN protocol is supported by most platforms but offers low levels of security?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!