computing with formulas extra more specificallythe string could contain expressions or variables enclosed in curly bracketsand we have included two such variablesn and amount when python encounters the curly brackets inside an -stringit will evaluate the contents of the curly bracketswhich can be an expression or variableand insert the resulting value into the string the process is often referred to as string interpolation or variable interpolationand it exists in various forms in many programming languages in our casepython will simply insert the current values of the variables and amount into the stringbutif desiredwe can also include mathematical expression inside the bracketssuch as print( " + { + }" + the only requirement for the contents inside the curly brackets is that it be valid python expression that can be evaluated to yield some kind of value throughout this book we will typically use -string formatting to insert combining text and numbersbut it may also be used for expressions with other types of output the -string formatting will often produce nicely formatted output by defaultbut sometimes more detailed control of the formatting is desired for instancewe might want to control the number of decimal places when outputting numbers this is conveniently achieved by including format specifier inside the curly brackets considerfor instancethe following codet print( "default output gives { "print( "we can set the precisiont { "print( "or control the number of decimalst { "default output gives we can set the precisiont or control the number of decimalst there are many different format specifiersfor controlling the output format of both numbers and other types of variables we will use only small subset in this bookand primarily to control the formatting of numbers in addition to those shown abovethe following format specifiers can be usefulprint( "we may set the space used for the outputt { : "we may set the space used for the outputt this specifier is used to control the number of decimalsas well as how much space (the number of charactersused to output the number on the screen here we have specified the number to be output with two decimal places and length of eightincluding the decimal places this form of control is very useful for outputting multiple lines in tabular formatto ensure that the