I wonder what does the code mean


Replace this line with your code.

I dont know "%.2f"s meaning in line 10.
I think f means float. however what does mean 2f?
% is for replacing total?
and why put dot(.) between % and 2f???


%.2f is similar to %f, it is a placeholder,and then % total indicate you want total at the place of the placeholder

.2 which inside your %f, simply indicates you want 2 decimal numbers


If I use ".3f", I could get 3 demical numbers! is it right?


%.3f will indeed give you a 3 decimal number indeed


I got it!
Thanks for giving me explanation!