TIP Calculator/ Introduction to Python

In this lab we were tasked with the problem to figure out the cost of a meal but the trick was to do this in a program called python. we were told to assign variables values or tell the program that it needed to calculate. it was fun doing this again i havent done coding since i was upstate in college the most difficult part was not the coding was uploading this to my portfolio i need to find an easier way to do it.

1

In this screenshot we can noticed that the person was told to the variable meal the value of 44.50 on line 3

2

Continuing on in this screenshot now the person was also told to assign the variable tax the value of 6.75% but in decimal form

3

Now similar to the second screenshot here they’re told to assign the variable tip the value of 15% but also in decimal form

4

Now for this screenshot, this is where we are telling the program that we want it to calculate so we are told to reassign meal= itself + itself * tip

5

Now for the last screenshot, in here we are told to assign the variable total to the sum of meal + meal * tip on line 8. and then we run the code and we get 54.63 for the total amount.