First draft problem2.py, updated problem1.py