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
shtirl [24]
2 years ago
5

Create a program that calculates the tip and total for a meal at a restaurant. Type the code into an IDLE IDE editor window and

save the finished code as a .py source code file. Remember that the text output from the IDLE shell window will be saved to a Word document.
Computers and Technology
1 answer:
Nataly [62]2 years ago
4 0

Missing details:

The formula for calculating the tip amount is:

tip = cost of meal * (tip percent / 100)

  • The program should accept decimal entries like 52.31 and 15.5.
  • Assume the user will enter valid data.
  • The program should round the results to a maximum of two decimal places.

Answer:

In Python:

print("Tip Calculator")

cost_meal =  float(input("Enter Cost of Meal: "))

tip_percent = float(input("Enter Tip Percent: "))

tip_amount = cost_meal * tip_percent / 100

total_amount = tip_amount + cost_meal

print("Tip amount:   "+str(round(tip_amount,2)))

print("Total amount:   "+str(round(total_amount,2)))  

Explanation:

This line prints the string "Tip "Calculator"

print("Tip Calculator")

This lime prompts user for cost of meal

cost_meal =  float(input("Enter Cost of Meal: "))

This lime prompts user for tip percemtage

tip_percent = float(input("Enter Tip Percent: "))

This line calculates the tip amount

tip_amount = cost_meal * tip_percent / 100

This line calculates the total amount

total_amount = tip_amount + cost_meal

This line prints the tip amount

print("Tip amount:   "+str(round(tip_amount,2)))

This line prints the total amount

print("Total amount:   "+str(round(total_amount,2)))  

Follow these steps to complete the solution

  • <em>Copy the code in the answer section.</em>
  • <em>Save as .py</em>
  • <em>Run the program</em>
  • <em>Save the screenshots of the program result in a word document</em>
You might be interested in
A(n) _____ is a simple database program whose records have no relationship to one another.
almond37 [142]
"flat file"

A simple database program whose records have no relationship to one another<span>single</span>
7 0
3 years ago
How does Programming change with the times?
KonstantinChe [14]

Answer:

by coding

Explanation:

4 0
2 years ago
Which tasks can a user accomplish by using the Find and Replace feature of Word? Check all that apply.
sveticcg [70]

Answer:

B,C,E your welcome

Explanation: i just took the test

3 0
2 years ago
A device that modulates digital data onto an analog signal and then demodulates the analog signal back to digital data is a ____
LenKa [72]
A modem. (From modulator-demodulator)
5 0
2 years ago
Well this isn't school related, but how do i watch dubbed and subbed anime for free on my computer?
Shtirlitz [24]
Crunchyroll or my anime list. Both of these work.

Hope this helps you

3 0
3 years ago
Read 2 more answers
Other questions:
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • An expression that has correctly paired delimiters is called a(n)
    6·1 answer
  • The java compiler requires that a source file use the ________ filename extension question 3 options: 1) .class 2) .h 3) .java
    8·1 answer
  • Para que se utiliza openoffice en la vida cotidiana?
    7·2 answers
  • To move up one paragraph, press the ____ key(s). f1 alt up arrow up arrow ctrl up arrow
    8·1 answer
  • After you select a cell with an error indicator, you can click the error checking _______ to display additional information abou
    14·1 answer
  • Where could an identity theft access your personal information?
    9·2 answers
  • What is sun and what does it do?
    12·2 answers
  • AYUDAAAA!!!!! URGENTE!!!!!!1<br> ¿para que sirve la "BIG DATA"?
    9·1 answer
  • The signature area in a cover letter includes the sender's first and last name, followed by his/her job title (if applicable). *
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!