First Python Attempt (CMSC 141 Machine Problem)