I'm trying to produce a stack of rows and columns with the addition of X's and O's to produce a game of Tic-tac-toe
. I'm still having trouble of the placement of each of the two functions for a merger. I'm using Python by the way and I just need for anyone to know that if they are experienced with Python.
def BoardX(rows):
for rows in range(10): #0,1,2,3,4,5,6,7,8,9...20
if rows%2 == 0: #0,2,4,6,8,10...20
for columns in range(1,11): #1,2,3,4,5,6,7,8,9,10...20
if columns%2 == 1:
if columns != 10:
print(" ",end=" | "*5)
else:
print(" ")
else:
print(" ",end=" ")
return True
break
def BoardY(columns):
for columns in range(5):
if columns%3 == 0:
for rows in range(1,6):
if rows%3 == 1:
if rows != 5:
print(" ",end="O")
else:
print("")
else:
print("X",end=" ")
BoardX(1,11)
BoardY(2,10)
What I have tried:
*I tried using an additional value of the "-" with in the first quotations of line 8 and the of line 10 in function BoardX.