# hw 3.8 Submission did not terminate

 0 I have a problem that I don't quite grasp. I know that there is a bug with the homework checker. However all the typical solutions, such as adding blank lines, don't seem to solve the problem. Could someone please give me some advise? This is my code: def check_sudoku(list): for i in range(len(list)): row = [] column = [] for j in range(len(list)): if list[i][j] in row or list[i][j]>len(list): return False elif list[j][i] in row or list[j][i]>len(list): return False else: row.append(list[i][j]) column.append(list[j][i]) return True print check_sudoku(correct)  asked 18 Mar '12, 16:59 juan_fasching 1 accept rate: 0% Anton Golov ♦ 13.3k●21●74●174

 2 You never use column, while you probably should be for the column checks. I see no reason for your code to loop forever, but this will cause it to sometimes return incorrect results. answered 18 Mar '12, 17:23 Anton Golov ♦ 13.3k●21●74●174
 0 I got the same message. Ran it several times in IDLE, and terminated just fine. def check_sudoku(l): n = len(l) if n < 1: return False for k in l: if len(k) != n: return False for i in range(n): if l[i][i] in l[i][:i]+l[i][i+1:]: return False vert.append([]) for j in range(n): vert[i].append(l[i][j]) if vert[i][i] in vert[i][:i]+vert[i][i+1:]: return False return True  answered 18 Mar '12, 17:46 Andy Nees-3 44●6
Question text:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

×15,234
×118
×15