On 2013-11-12 14:27, lrwarre...@gmail.com wrote: > if int(raw_input()) == 1: > print "Moving north" > y = y + 1 > elif int(raw_input()) == 2: > print "Moving east" > x = x + 1 > elif int(raw_input()) == 3: > print "Moving south" > y = y - 1 > elif int(raw_input()) == 4: > print "Moving west" > x = x - 1 > elif int(raw_input()) == 5: > print "Dost thou leave so soon? Fare thee well!" > quitCommand = 5 > else: > print "I find your lack of reading comprehension skills > disturbing."
Note that you're asking for input with each comparison. Best to get the input once and store it in a variable before the "if" statement and then do the comparisons against the same value. -tkc -- https://mail.python.org/mailman/listinfo/python-list