A quick look suggests your indentation is off on the elif line Probably the line *after* elif, starting with 'if' But there are more problems. The indentation after the 'sys.exit()' cannot be correct. It puts all the code below it inside the 'gameover' procedure, meaning it will never be reached......