''' Purpose: demonstrate arithmetic and use of variables for naming things ''' # name some values x = 3.5 y = 4.25 print( "x =", x ) print( "y =", y ) input() # display some float calculations print( 'Float arithmetic' ) total = x + y difference = x - y product = x * y dec_quotient = x / y int_quotient = x // y remainder = x % y power = x ** y 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 =', remainder ) print( 'x ** y =', power ) print() # So you can do math with decimals too # DECIMAL PATH PRODUCES DECIMAL RESULTS # Yes notes are posted in Meetings! # Recordings are under Meetings and on Collab/Our Class/Panopto x = float(2) # converts to 2.0 print ( x )