# *************************************
# Cannon
# 2014
# file: math_stuff.py
#
# This program demonstrates the use of the math module
#***************************************

import math #this imports the math module

#constants in the math module
print('some constants')
print('pi: {:.4f}'.format(math.pi))
print('e: {:.4f}'.format(math.e))

#some common functions
print()
print('some comon fuctions')
print('square root of 3: {:.4f}'.format(math.sqrt(3)))
# or we can use the pow function
print('square root of 4: {:.4f}'.format(math.pow(4,.5)))

#all of the usual suspects are here
print()
print('sin of pi / 2: {:.4f}'.format(math.sin(math.pi/2)))

print('to convert degrees to radians use degrees()')
print('pi is {:.4f} degrees'.format(math.degrees(math.pi)))

print('read more in the Python documentation!')