''' Purpose: demonstrate arithmetic and use of variables for naming things ''' # name some values a = 4 b = 10 c = -5 d = 100 print( a ) print( b ) print( c ) print( d ) input() print( "a =", a ) print( "b =", b ) print( "c =", c ) print( "d =", d ) input() w = -3.14 x = 4.25 y = 10.75 z = 2.50 print( "w =", w ) print( "x =", x ) print( "y =", y ) print( "z =", z ) input() # display some calculations with integers print( 'Integer manipulation' ) print() print( a, '+', b, '=', a + b ) print( b, '-', a, '=', b - a ) print( a, '*', b, '=', a * b ) print( b, '/', a, '=', b / a ) input() print( b, '//', a, '=', b // a ) input() print( b, '**', d, '=', b ** d ) input() print( b, '%', a, '=', b % a ) input() print( -b, '=', -b ) input() print( 'abs(', c, ') =', abs( c ) ) print( 'int(', y, ') =', int( y ) ) print() # display some calculations with floats print( 'Float manipulation' ) print() print( x, '+', y, '=', x + y ) print( y, '-', x, '=', y - x ) print( x, '*', y, '=', x * y ) print( y, '/', x, '=', y / x ) input() print( y, '//', x, '=', y // x ) print( y, '%', x, '=', y % x ) print( x, '**', z, '=', x ** z ) input() print( -y, '=', -y ) input() print( 'abs(', w, ') =', abs( w ) ) print( 'float(', x, ') =', float( x ) ) input() # display some calculations with mixed operands print( 'Mixed numeric manipulation' ) print() print( a, '+', y, '=', a + y ) print( y, '-', b, '=', y - b ) print( a, '*', y, '=', a * y ) print( y, '/', b, '=', y / b ) input() print( y, '//', b, '=', y // b ) print( y, '%', b, '=', y % b ) print( a, '**', z, '=', a ** z )