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
The central processing unit​ (cpu) works in conjunction with​ ________ to perform processing.
Mama L [17]
The central processing unit​ (CPU<span>) </span>works in conjunction<span> with​ </span><span>______ to perform processing</span>
4 0
3 years ago
Which of the following is NOT an example of written communication?
Veronika [31]

Answer:A conversation between co-workers

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
Identify what algorithm or concept the following code relates to. void Sort(int array[], int tempArray[], int left, int right) {
galina1969 [7]

Answer:

Binary sort

Explanation:

Binary sort is one of the fastest search techniques used on arrays and other iterable data types. It algorithm sorts the array in ascending order then gets the item in the middle from which it divides the array to be searched in two parts. If the searched term is less than the mid item, then it is searched for in the first part, else it would be in the second.

4 0
2 years ago
AtlasNow Construction Company, a general contractor, plans to place a bid for building a hospital. It requests bids from subcont
Lorico [155]

Promissory estoppel legal doctrine can help AtlasNow from being meted out injustice due to lack of consideration

<h3><u>Explanation:</u></h3>

Promissory estoppel is a concept in contract law that hinders a person from running backward on a promise yet if a legal contract seems not to endure. It declares that an aggrieved party can redeem losses from a promisor if the losses acquired were the consequence of a promise tendered by the promisor, which he relied on to his succeeding loss.

Promissory estoppel is assigned to hold the promisor from claiming that an underlying promise should not be lawfully propped or forced. It assists injured parties to overcome on promises performed that have commenced to economic loss when not met.

7 0
3 years ago
Other questions:
  • Jack wants to store a large amount of data on his computer. He chooses to use a database for this purpose. What is a database? A
    8·1 answer
  • Question: A famous Disney Movie partially takes place in this city.
    15·2 answers
  • When you identify the data elements in a new database, you typically subdivide data elements into?
    14·1 answer
  • Which of the following is NOT an advantage to using inheritance?
    13·1 answer
  • The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a
    11·1 answer
  • Can someone help me?
    10·1 answer
  • What might a designer need to consider when choosing an appropriate energy source for products and power systems
    15·1 answer
  • Bryan's company is new and has limited funds to work with. He has been tasked with finding a telecommunications technology that
    7·1 answer
  • Which of the following is a type of input device?
    5·1 answer
  • What is an operating system that controls some aspects of the computer?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!