board= for i in range(5(x)): y=["O"]*5 y.append(i) Create a 5 x 5 grid initialized to all 'O's and store it in board. Use range() to loop 5 times. Inside the loop, .append() a list containing 5 "O"s to board, just like in the example above. Note that these are capital letter "O" and not zeros. I GET->Traceback (most recent call last): File "python", line 3, in <module> NameError: name 'x' is not defined
5(x) is not a valid range.
Did you mean,
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.