Lab 1: Python 1

Lab Description:

In this lab I used the tip calculator to figure out how much the bill for a meal is going to add up to.  First, I had to add the tax onto what was already the bill for what we ate, which was 6.75 percent of the bill.  Then, I had to calculate another amount to add to the bill which was the tip to give to the generous waiter.  The tip was 15 percent of the bill.  After all this calculations I came up with how much the bill would come out to be.

Code:

# Assign the variable total on line 8!

meal = 44.50
tax = 0.0675
tip = 0.15

meal = meal + meal * tax
total = meal + meal * tip

print(“%.2f” % total)

Screen Shots:

This is the screen shot of the codes and the result of the codes.

Unsaved Preview Document

Leave a Reply

Your email address will not be published. Required fields are marked *