What does this line of code mean in the tip calculator


#1

meal = 44.50
tax = 6.75 / 100
tip = 15.0 / 100

meal = meal + meal * tax
total = meal + meal * tip

print("%.2f" % total)


#2

well, %f is a string placeholder for a float variable, the.2 indicates the number of decimals we want to have


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.