of courseusing float to convert string to number requires that the string actually be number trying to convert regular wordas in float(hellowill make the program stop with an error message there are numerous other built-in functions for converting between typessuch as int for conversion to an integer and str for conversion to string throughout this book we will mostly use the float conversion formatting text output the calculations in the programs above would output single numberand simply print this number to the screen in many cases this solution is finebut sometimes we want several numbers or other types of output from program this is easy to do with the print functionby simply putting several variables inside the parenthesesseparated by comma for instanceif we want to output both primary and final_amount from the calculation abovethe following line would workprint(primary,final_amount howeveralthough this line worksthe output is not very readable or useful sometimes better output format or combination of text and numbers is more usefulfor instanceafter years eur has grown to xxx eur there are multiple ways to obtain this result in pythonbut the most recent and arguably most convenient is to use so called -stringswhich were introduced in python if you are using an earlier version of pythonthe following examples will not workbut there are alternative and fairly similar ways of formatting the text output to achieve the output string aboveusing the -string formattingwe would replace the final line of our program by with print( "after {nyears eur has grown to {amounteur "after years eur has grown to eur there are couple of things worth noticing here firstwe enclose the output in quotation marksjust as in the helloworldexample abovewhich tells python that this is string secondthe string is prefixed with the letter fwhich indicates that the string is an -string that could contain something