""" Purpose: demonstrate decimal arithmetic """ # Name some variables and print their values x = 2.71 y = 3.14 print( "Values of interest" ) print( "x:", x ) print( "y:", y ) print() # Perform calculations total = x + y difference = x - y product = x * y dec_quotient = x / y int_quotient = x // y remainder = x % y power = x ** y # Print results print( "Results" ) print( "x + y: ", total ) print( "x - y: ", difference ) print( "x * y: ", product ) print( "x / y: ", dec_quotient ) print( "x // y:", int_quotient ) print( "x ** y:", power ) print( "x % y: ", remainder ) # terminating decimals is possible, z = 1.49872367491867501923856120938472 rz = round(z,3) print( "rz: ", rz ) # round() function has an option to specify the number of decimal points you want to round to