Python online class - TicTacToe
Вставка
- Опубліковано 16 січ 2025
- def custom_print(board):
for row in board:
print(row)
board = [
["_", "_", "_"],
["_", "_", "_"],
["_", "_", "_"],
]
game_running = True # change this (figure out how to check if game is over)
while game_running:
row = input("Please give us a row:")
column = input("Please give us a column:")
symbol = "X"
board[int(row)][int(column)] = symbol
custom_print(board)
row = input("Please give us a row:")
column = input("Please give us a column:")
symbol = "O"
board[int(row)][int(column)] = symbol
custom_print(board)