Adding python solution to problems 1, 2, 4, 5, 6, 8, 9.