If you followed my link above you should be clear on all your questions.
%s => str type value in the argument list
%f => float type value in the argument list
Would it not still require some kind of logic to fill in the values? Is that not restrictive in that it has a fixed number of whole digits?
%.2f
says to accept any float value but limit the output to 2 decimal places. The operative phrase here is, any float value.
The modulo before the argument list simply tells python that these are the values to fill in for the placeholders, in that order.
says to accept any float value
That is the same as a, directive.