initial commit. Licensed under BSD from http://inventwithpython.com/hacking/chapters/
some code formatting, little changes
added one more precision