• API
• FAQ
• Tools
• Archive
daily pastebin goal
55%
SHARE
TWEET

# Untitled

a guest Sep 14th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. def gensudoku():
2.     sudoku = dict()
3.     for x in range(1,10):
4.         for y in range(1,10):
5.             sudoku[x,y]=0
6.     print(sudoku)
7.     return sudoku
8.
9. def printsudoku(sudoku):
10.     sulist = []
11.     for x in range(1,10):
12.         for y in range(1,10):
13.             sulist.append(sudoku[x,y])
14.     for i in range(1,10):
15.         print(sulist[9*(i-1):9*i])
16.
17. def solvesdk(sdk):
18.     for x in range(1,10):
19.         for y in range(1,10):
20.             for z in range(1,10):
21.                 column = [sdk[x,1] + sdk[x,2] + sdk[x,3] + sdk[x,4] + sdk[x,5] + sdk[x,6] + sdk[x,7] + sdk[x,8] + sdk[x,9]]
22.                 row = [sdk[1,y] + sdk[2,y] + sdk[3,y] + sdk[4,y] + sdk[5,y] + sdk[6,y] + sdk[7,y] + sdk[8,y] + sdk[9,y]]
23.                 group =
24. #                if z is not
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top