Add example solution for exercise 1 in python