Need Help!


def tax(bill):
****bill *= 1.08
****print "With tax: %f" % bill
****return bill

Can anyone explain the use of the 2 "%" in line 3?


google search
print "%f"


Hi @fsy135215,

%f serves as a placeholder: with the % in (%bill) you tell python what should be 'placed' at the position of the placeholder. In this case the value of bill will be placed at the position of %f in the printed information.

I hope that helps...



AND it would displayed as a floating-point......