'this float has width and precision "compare { and { : }format( 'compare and notice that for normal (not fixed-pointfloating point numbersthe precision specifies the number of significant digits to print for fixed-point (indicated by the at the end of the specifierthe precision gives the number of decimal places in the last examplethe same number is printed out in two different formats it illustrates that if you print enough digits of floating-point numberyou will almost always find "surprise the computer can' represent exactly as floatingpoint number the closest value it can represent is ever so slightly larger than if not given an explicit precisionpython will print the number out to few decimal places the slight extra amount shows up if you print lots of digits generallypython only displays closely rounded version of float using explicit formatting allows you to see the full result down to the last bit you may notice thatby defaultnumeric values are right-justified this is helpful for lining up numbers in columns stringson the other handare left-justified in their fields you can change the default behaviors by including an explicit justification character at the beginning of the format specifier the necessary characters are and for leftrightand center justificationrespectively "left justification{ :< }format("hi!"'left justificationhi"right justification{ :> }format("hi!"'right justificationhi!"centered{ :^ }format("hi!"'centeredhibetter change counter let' close our formatting discussion with one more example program given what you have learned about floating point numbersyou might be little uneasy about using them to represent money suppose you are writing computer system for bank your customers would not be too happy to learn that check went through for an amount "very close to $ they want to know that the bank is keeping precise track of their money even though the amount of error in given value is very smallthe small errors can be compounded when doing lots of calculationsand the resulting error could add up to some real cash that' not satisfactory way of doing business better approach would be to make sure that our program used exact values to represent money we can do that by keeping track of the money in cents and using an int to store it we can then convert this into dollars and cents in the output step assuming we are dealing with positive amountsif total represents the value in centsthen we can get the number of dollars by integer division total / and the cents from total both of these are integer calculations andhencewill give us exact results here is the updated program