Lab 1: Python 1

Lab report Python 1

Lab Description:

In this lab we are working with codes. we learned steps on how to write codes with values and how to make words or letters equal to a number. From learning how to generate quotes we then had to solve a problem using codes. In the picture below is the problem we had to solve and the answer is at the top right.  we had to find the cost of the meal with tax and tip. for this we had to set up men to equal the cost of the food then we found our tax and tip an we added them up together. first to get the meal we added meal+meal+tax and then for the total we added meal+meal+tip. Our tax we added to be in the value of the word meal.

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 Shot:

Screenshot 2013-09-24 at 8.04.29 PM

 

Leave a Reply

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