Working on python code for the first exercise.