Python Homework Help - Python Logical Puzzles, Games, and Algorithms: 8 queens problem