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
c724 wgu True or false. A storage device consists of all the components that work together to process data into useful informati
Law Incorporation [45]

Answer:

False

Explanation:

A output device consists of all the components that work together to process data into useful information

8 0
3 years ago
Why is the binary number system used in digital logic?
Slav-nsk [51]
<span>Binary number system used in digital logic because of the simplest nature of its representation.</span>
8 0
3 years ago
An order placement process software system which gives customers easy access to data relevant to the options available for a pro
IRISSAK [1]

Answer:

D. a configurator.

Explanation:

According to my research on the food businesses, I can say that based on the information provided within the question the software system being mentioned in the question is called "a configurator". This type of system allows customers to choose different components and options when making a purchase in order to get exactly what they want.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Read 2 more answers
The Fibonacci numbers are a sequence of integers in which the first two elements are 1, and each following element is the sum of
ioda

Answer:

// program in java to print 12 fibonacci terms

// package

import java.util.*;

// class definition

class Main

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

     

      // variables

      int no_of_term=12, f_term = 1, s_term = 1, n_term = 0;

      System.out.print("First 12 term of Fibonacci Series:");

      // print 12 terms of the Series

       for (int x = 1; x<= no_of_term; x++)

           {

       // Prints the first two terms.

            if(x <=2 )

            System.out.print(1+" ");

            else

            {

               // find the next term

                n_term = f_term + s_term;

                // update the last two terms

                f_term = s_term;

                s_term = n_term;

                // print the next term

              System.out.print(n_term+" ");

            }

           }

     

     

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize no_of_term=12,f_term=1,s_term=1 and n_term=0.Run a loop  for 12 times, for first term print 1 and then next term will be calculated as  sum of previous two term of Series.Then update previous two term.This will  continue for 12 time and print the terms of Fibonacci Series.

Output:

First 12 term of Fibonacci Series:1 1 2 3 5 8 13 21 34 55 89 144

4 0
3 years ago
What is the purpose of the Revisions pane in a presentation?
lana [24]
First option


Sorry if I’m wrong
7 0
3 years ago
Read 2 more answers
Other questions:
  • When computer manufacturers overcame the enormous 13,000 Chinese character barrier by creating a workable keyboard through voice
    15·1 answer
  • Multiple choice
    9·2 answers
  • Write the simplest statement that prints the following on a single line: 3 2 1 Go! Note: Whitespace (blank spaces / blank lines)
    11·1 answer
  • True or false: if we’re short side the subject in our composed frame, we have given the subject the maximum amount of “lead room
    15·1 answer
  • What is meant by polling mode in communication between software andUART and what is its disadvantage as compared to interrupt mo
    14·1 answer
  • "3. 4. Simple number search We will pass you 2 inputs an list of numbers a number, N, to look for Your job is to loop through th
    5·1 answer
  • If byte stuffing is used to transmit Data, what is the byte sequence of the frame (including framing characters)? Format answer
    6·1 answer
  • In Linux, the /etc/inittab file describes the processes that are started up during boot up. Each entry in the /etc/inittab file
    10·1 answer
  • my I phone is in recovery mode and when I connect to my PC the I device is not connected to iTunes although i have the latest ve
    7·2 answers
  • Consider this binary search tree:______.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!