''' Purpose: demonstrate arithmetic and use of variables for naming things ''' # name some values a = 13 b = 5 print( "a =", a ) print( "b =", b ) input() # display some integer calculations print( 'Integer arithmetic' ) total = a + b difference = a - b product = a * b dec_quotient = a / b int_quotient = a // b remainder = a % b power = a ** b print( 'a + b =', total ) print( 'a - b =', difference ) print( 'a * b =', product ) print( 'a / b =', dec_quotient ) print( 'a // b =', int_quotient ) print( 'a % b =', remainder ) print( 'a ** b =', power ) input() # introduce some other built-in functions print( 'Some handy functions' ) c = -10 d = 1.75 e = -1.75 print( "c =", c ) print( "d =", d ) print( "e =", e ) input() abs_c = abs( c ) float_c = float( c ) int_d = int( d ) print( 'abs( c ) =', abs_c ) print( 'float( c ) =', float_c ) print( 'int( d ) =', int_d ) print()