tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code21:30

Let's code a TIC TAC TOE game in python! ⭕

Bro Code ↗

From the creator

python tic tac toe game tutorial example explained #python #tictactoe #game # ******************************************************** # Python Tic Tac Toe game # ******************************************************** from tkinter import * import random def next_turn(row, column): global player if buttons[row][column]['text'] == "" and check_winner() is False: if player == players[0]: buttons[row][column]['text'] = player if check_winner() is False: player = players[1] label.config(text=(players[1]+" turn")) elif check_winner() is True: label.config(text=(players[0]+" wins")) elif check_winner() == "Tie": label.config(text="Tie!") else: buttons[row][column]['text'] = player if check_winner() is False: player = players[0] label.config(text=(players[0]+" turn")) elif check_winner() is True: label.config(text=(players[1]+" wins")) elif check_winner() == "Tie": label.config(text="Tie!") def check_winner(): for row in range(3): if buttons[row][0]['text'] == buttons[row][1]['text'] == buttons[row][2]['text'] != "": buttons[row][0].config(bg="green") buttons[row][1].config(bg="green") buttons[row][2].config(bg="green") return True for column in range(3):

Published 2021-02-01 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code