Python Editor: https://fanwaar.com/coderboy/python/
Watch Full Series: • Python Tutorials | Learn Python: Let's Lea...
Welcome to Episode 26 of our beginner Python series.
In this lesson, you will build the biggest project of Part One: a real Tic-Tac-Toe game in Python. Two players, X and O, take turns on a 3 by 3 board. If one player gets three marks in a row, across, down, or diagonal, that player wins.
In this video, Coderboy shows how to use a list to store the board, nine empty spaces for nine squares, functions as helper blocks, mark() to decide what to show in one square, show() to draw the full board, clear() to keep the screen clean, WIN_LINES to store all eight winning lines, input() to ask players for moves, int() to turn the answer into a number, and minus one because Python lists start from zero.
What you will learn:
How to build a Tic-Tac-Toe game in Python
How to store a game board inside a Python list
Why a Tic-Tac-Toe board needs nine spaces
How to show square numbers from 1 to 9
How Python list positions work from 0 to 8
How mark() decides what to show in one square
How str() turns numbers into text
How show() draws the full board
How clear() keeps the game screen clean
How WIN_LINES stores all eight winning lines
How input() asks players for moves
How int() converts typed input into a number
Why we subtract one from the player’s move
How if statements check if someone won
How loops repeat turns
How break stops the game when someone wins
How a for loop else can show a tie
How player switching lets X and O take turns
How small Python ideas become a complete game
------------------------------------
Welcome to Episode 26 of our beginner Python series.
Is lesson mein aap Part One ka biggest Python project build karenge: Tic-Tac-Toe game. Is game mein two players, X aur O, 3 by 3 board par turns lete hain. Agar ek player ko three marks ek line mein mil jaate hain, across, down, ya diagonal, to woh player win karta hai.
Is video mein Coderboy dikhayega ke Python list se board kaise store karte hain, nine empty spaces se nine squares kaise banate hain, functions ko helper blocks ki tarah kaise use karte hain, mark() se ek square mein kya show karna hai kaise decide karte hain, show() se full board kaise draw karte hain, clear() se screen clean kaise rakhte hain, WIN_LINES se eight winning lines kaise store karte hain, input() se player move kaise lete hain, int() se answer ko number mein kaise convert karte hain, aur minus one kyun use karte hain because Python lists zero se start hoti hain.
What you will learn:
Python mein Tic-Tac-Toe game kaise build karte hain
Python list mein game board kaise store karte hain
Tic-Tac-Toe board ko nine spaces kyun chahiye
Empty squares par numbers 1 to 9 kaise show karte hain
Python list positions 0 to 8 kaise kaam karti hain
mark() ek square mein kya show karna hai kaise decide karta hai
str() number ko text mein kaise convert karta hai
show() full board kaise draw karta hai
clear() screen ko clean kaise rakhta hai
WIN_LINES eight winning lines ko kaise store karta hai
input() player se move kaise poochta hai
int() typed input ko number mein kaise badalta hai
Player move se one subtract kyun karte hain
if statements game ko kaise check karte hain
loops turns ko repeat kaise karte hain
break game ko win ke baad kaise stop karta hai
for loop else tie ka message kaise show karta hai
Player switching se X aur O turns kaise lete hain
Small Python ideas se complete game kaise banta hai
-------------------------------
Password Strength Checker: ( • Password Strength Checker in Python | Begi... )
#coderboy #python #pythonforbeginner #learnpython #pythontutorial #codingforbeginners #pythonproject #tictactoe #pythongame #beginnerpython
Auf dieser Seite können Sie das Online-Video Build Tic-Tac-Toe in Python | Ep 26 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Farrukh Anwaar 28 Juni 2026 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 114 Mal angesehen und es wurde von 5 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!