Lab 1

Tip Calculator

This lab consisted of us learning the basics of python in class before going off on our own. Once we learned the basics of python in class we had to finish the tip calculator in python. What you see below are the codes i used and the values of different names. Once the values where set and the code was finished all that was left to do was run the code to see if it worked. When ran the tip calculator came to a total of $54.63, which can be seen in the screen shot.

Coding used:

meal = 44.50
tax = 0.0675
tip = 0.15

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

print(“%.2f” % total)

1

Leave a Reply

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