the instructions for the data to insert can also be given by position index (from the optional end of string format operation (page )) 'longer{ }shorter{ fformat( 'longer shorter in each of these approachesthe colon and formatting specification come at the end of the expression inside the bracesjust before the closing this follows the and symbols (if anyidentifying what value to use for the substitution there are many more fancy formatting options for the string format method that we will not discuss going to the opposite extremeand using formatting with many digitsyou can check that python does not necessarily remember simple decimal numbers exactlyformat '' format '' format '' format '' python stores the numbers correctly to about or digits you may not care about such slight errorsbut you will be able to check in that if python tests the expressions and for equalityit decides that they are not equalin factas you can see abovethe approximations that python stores for the two expressions are not exactly equal warningdo not depend on the exactness of floating point arithmeticeven for apparently simple expressionsfloating point formatting code similar to this section is also in example program floatformat py floating point exercise write programdiscount pythat prompts the user for an original price and for discount percentage and prints out the new price to the nearest cent for example if the user enters for the price and for the discount percentagethe value would be ( / rounded to two decimal places for price with percent discountthe value would be ( / rounded to two decimal places write the general calculation code following the pattern of the calculations illustrated in the two concrete examples summary section references in square brackets indicate where an idea was first discussed where python syntax is illustratedthe typeface continues to indicate the category of each part in python +the previous expressions make sensebut in earlier versions of python and in other languages like +and javawhere there are not separate division operators /and /these expressions would be wrong because of the multiple meanings of the operator with different types the expressions would work in these other languages iffor example were replaced by beginning with python