documented Norvigs code in hw1...py file