Adding solution for problem 5 in python.
Adding solution for problem 6 in python.
Adding solution for problem 7 in python.