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]
3 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]3 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
Briefly explain how developers use a distributed version management system. You may assume that a master repository has been set
Akimi4 [234]

Answer:

Using version control tools like Git and Github.

Explanation:

Version control is a vital tool in programming in recent times. it helps to prevent loss of source codebase and creating unwanted folders for storing multiple codebases to prevent excess storage usage and time consumption.

Git and Github is a platform that handles version control and collaboration between co-workers. When a repository is created, its initial branch is called the master branch and when a staged code is committed, the commit is recorded. These records can be retrieved using the commit hash value and resetting the current unstaged file or code. A new branch can created to hold a different version of an application and merged later with the master branch.

4 0
3 years ago
What technique is used to separate the different cell parts?
Brut [27]
This should be in Science/Biology
5 0
3 years ago
Help with computer. homework
drek231 [11]
Im pretty sure the answer would be 82 because it's concatenating 2 to string(y)
8 0
4 years ago
The intranet is the same as the internet. true false
galina1969 [7]
False, the intranet <span> does not refer to a network that supports communication between different organizations.</span>
5 0
3 years ago
Read 2 more answers
What's the best way to change the font size of all your notes pages at once?
defon
On which os? mac os windows linux?
7 0
3 years ago
Other questions:
  • Waterpower was first harvested by ancient societies using
    5·1 answer
  • Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate
    10·2 answers
  • What is the main difference between EDBAC and EDNIAC......​
    13·2 answers
  • Which of these IP addresses is not a valid address? a. 199.199.3.3 b. 192.168.258.4 c. 192.168.0.9 d. 10.10.10.40
    13·1 answer
  • What are motion graphics?
    9·1 answer
  • How can I do a project with a model on the steam machine?
    14·1 answer
  • ​What is a combination of one or more related characters or bytes and is the smallest unit of data a user accesses?
    8·1 answer
  • Our Client, a renowned trading company, suffered a sudden, devastating power outage that caused their server to cease functionin
    13·1 answer
  • I figured out the secret message in Dad feels good, I can connect the dots
    8·1 answer
  • 8.10 Code Practice Question 3
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!