code in python cse 142 943771