Part #1: get user input User is to enter integer as indicated: 0 -- rock 1 -- paper 2 -- scissors 3 -- quit Algorithm: loop v <- what user enters on exception: print "You have to enter ..." if v is 0, 1, 2, or 3: break else: print "You have to enter ..." endloop print v return v Exceptions: name, type, syntax ... def getuser(): while True: try: v = input("Enter 0 (rock), 1 (paper), 2 (scissors), 3 (quit): ") v += 0; except EOFError: v = 3 except (SyntaxError, NameError, TypeError): v = -1 if 0 <= v and v <= 3: break print "You have to enter a 0, 1, 2, or 3 only" print "You pick", what(pick) return v