Added makefile.
Added python code with same algorithm as original c code.
Updated python code slightly.
Python code in line with c code.