Breaking Code Into Functions Python Code