""" Purpose: demonstrate decimal arithmetic """ # Name some variables and print their values x = 2.71 # float is another way of saying decimal 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 # integer division when using decimals/floats will have a decimal/float result int_quotient = x // y remainder = x % y power = x ** y # when we give you assignments, we will try to make it clear what we want the output to look like. # follow directions closely! # 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 )