The code works inside Python shell, but not inside VS Code terminal. Can anyone please help me, I am about to go nuts.
I have tested my code on several ide and it works fine, just on VS
board = [" " for i in range(9)]
def print_board():
row1 = "| {} | {} | {} |".format(board[0], board[1], board[2])
row2 = "| {} | {} | {} |".format(board[3], board[4], board[5])
row3 = "| {} | {} | {} |".format(board[6], board[7], board[8])
print(row1)
print(row2)
print(row3)
print()
def player_move(icon):
if icon == "X":
number = 1
elif icon == "O":
number = 2
print("Your turn player {}".format(number))
choice = int(input("Enter your move (1-9): ").strip())
if board[choice - 1] == " ":
board[choice - 1] = icon
else:
print()
print("That space is taken!")
I need to see the board that I have created, it simply does not show anything inside VS code
It simply does not show anything inside the terminal and I don't get any errors.