Lab1: Python1

LOGICS lab 2

This lab was called tip calculator and what we had to do was we had to create a program that would calculate the tip of our meal.It started off with the variable meal and what we had to do was give it its value of 44.50. Then we moved on to give the variable tax its value which was .0675. After that we calculated the value for the tip variable which was .15. The end result we plugged everything and we got the answer of 54.63.

Source 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)