day1/exercise/bishop.py
author Shantanu <shantanu@fossee.in>
Wed, 18 Nov 2009 17:08:39 +0530
changeset 308 d93be08d69f8
parent 64 333092b68926
permissions -rw-r--r--
cheat sheet 1 Interactive Plotting.

r, c = 5, 4
for i in range(1, 9):
    for j in range(1, 9):
        a = r - i
        b = c - j
        if a and b and a == b or a == -b:
            print i, j