How do I format a floating number to a fixed width with the following requirements:
In Python 3.
GPA = 2.5 print(" %6.1f " % GPA)
6.1f means after the dots 1 digits show if you print 2 digits after the dots you should only %6.2f such that %6.3f 3 digits print after the point.
6.1f
%6.2f
%6.3f