Lab 1 Python

Lab 1: Python 1

Lab Description:

In this lab we learned about the basic things that you could do with Python. We also learned a few of the functions that will be very useful in the future when we start using Python more. We learned things such as value, variables, the print function, how to do basic algorithmic things such as add, subtract, multiply and divide. Also in this lab we were ale to do a few lines of coding using what we learned to give us a better understanding of what we were doing. I had a lot of fun doing this lab because I was able to learn many important when it comes to coding such as that you have to be very precise, because if you even miss a quotation mark where it belongs then your whole program will function properly or at all.

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)

Screenshot:

54.63
None

Leave a Reply

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