Tip Calculator

During  the tip calculator lab we began by declaring the variable meal and assigning the total value of the meal which was $44.50. Then proceeded to include the tax fee in our bill, by simply making a variable for tax. We then had to convert 6.75% to decimal form by the division of 6.75 / 100 we received decimal form. Next we added the variable for tips which was 15% but we needed to convert that 15% into decimal form so we got 15.0 / 100. Then we had to reassign the variable meal so it can be equaled as meal + meal * tax. Now that the meal has the cost of the food plus tax. By  coding the variable total being equaled  to meal + meal * tip, which allowed us to have the total cost of the meal.

 

Capture 2

 

 

Leave a Reply

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