Added solution to problem 31 in erlang.
Added solution to problem 31 in haskell.
Added solution to problem 31 in python.