formatting floats to format floating point numberthe formatting code is {:fto only display the number to two decimal placesuse { fthe can be changed to change the number of decimal places you can right-justify floats for example{: fwill allot eight spots for its value--one of those is for the decimal point and two are for the part of the value after the decimal point if the value is then only four spots are needed and the remaining spots are filled by spacescausing the value to be right-justified the and characters center and left-justify floats formatting strings to format stringsthe formatting code is {:shere is an example that centers some textprint'{:^ sformat'hi ')print'{:^ sformat'there')hi thereto right-justify stringuse the characterprint'{:> sformat'hi ')print'{:> sformat'there ')hi therethere is whole lot more that can be done with formatting see the python documentation [ nested loops you can put loops inside of other loops loop inside of another loop is said to be nestedand you canmore or lessnest loops as deeply as you want example print multiplication table for in range( , )for in range( , )print'{: dformat( * )end'print( multiplication table is two-dimensional object to work with itwe use two for loopsone for the horizontal direction and one for the vertical direction the print statement right justifies the products to make them look nice the end='allows us to print several things on each row when we are done printing rowwe use print(to advance things to the next line