print("%.2f" % total)

Cai Gengyang gengyangcai at gmail.com
Sun Nov 22 01:30:13 EST 2015


meal = 44.50
tax = 0.0675
tip = 0.15

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

print("%.2f" % total)   

What do the lines inside the parentheses in this statement print("%.2f" % total) mean ? 

What does "%.2f" % total represent ?

Thanks alot ...

Gengyang



More information about the Python-list mailing list