Python Project: Tic Tac Toe Game in Python 🔥
Вставка
- Опубліковано 2 жов 2024
- Today we are going to create a tic tac toe game using the python programming language. This video will teach you the way to create a nice and easy playable tic tac toe game in python!
All the source code and other material will be uploaded on codewithharry.com as and when available!
Source Code: gist.github.co...
►Checkout my English channel here: / @programmingwithharry
►Instagram: codewithharry
python, C, C++, Java, JavaScript and Other Cheetsheets [++]:
Playlist: • Coding CheatSheets 🧾 b...
►Learn in One Video[++]:
Python[15 Hr] - • Python Tutorial For Be...
Python Advance[3.5 Hr] - • Python Programming Cou...
Python[1 Hr] - • Learn Python In Hindi ...
Python[2 Hr] - • Python Tutorial In Hin...
Python[15 Min] - • 15 Minute Python Tutor...
JavaScript[1 Hr] - • JavaScript Tutorial
C[1.3 Hr]- • C Programming Tutorial...
php[1 Hr] - • Learn Php In One Video...
php[2.3 Hr] - • Php Tutorial for Begin...
php[Project]- • Login And Registration...
HTML[30 Min] - • HTML 5 Tutorial For Be...
CSS[8.5 Hr] - • CSS Tutorial In Hindi ...
CSS[1.4 Hr] - • CSS 3 Tutorial For Beg...
Wordpress[3.2 Hr] - • How To Make a WordPres...
Angular[2 Hr] - • Angular Tutorial in Hindi
Java[2.3 Hr] - • Java tutorial in hindi 🔥
Web Scraping[1 Hr] - • Web Scraping Tutorial ...
MongoDB[2 Hr] - • MongoDb Tutorial For B...
Numpy[1 Hr] - • Numpy Tutorial in Hindi
Android Dev[12 Hr]- • Android Development Tu...
Linux[1 Hr] - • Linux Tutorial For Beg...
JQuery[1.1 Hr] - • jQuery Tutorial For Be...
Git and GitHub[1.1 Hr] - • Git & GitHub Tutorial ...
►Complete course [playlist]:
React - • React Js Tutorials in ...
Python- • Python Tutorials For A...
OOP Python- • Object Oriented Progra...
Java - • Java Tutorials For Beg...
JavaScript- • JavaScript Tutorials I...
PHP- • PHP Tutorials in Hindi
C- • C Language Tutorials I...
C++- • C++ Tutorials In Hindi
Git & GitHub- • Git and GitHub Tutoria...
Android Dev- • Android Development Tu...
Python GUI- • Python GUI: Tkinter Tu...
Web Development- • Web Development Tutori...
Python Django - • Python Django Tutorial...
Projects Using HTML, CSS & Javascript- • Projects Using HTML, C...
Data Structure and Algo - • Data Structures and Al...
Follow Me On Social Media
►Website (created using Django Rest & Angular) - www.codewithha...
►Facebook - / codewithharry
►Instagram - / codewithharry
Twitter - / haris_is_here
Comment "#HarryBhai" if you read this 😉😉
Who wants projects in C Language?
I don't want
I want sir
Sir provide a vedio on laptop buy under 50000
Ye sir we want it
Harry brother, I really want projects in C language. And thank you for these awesome projects.
the fact that he started the project without any introduction shows that how much he cares about our time
Old Harry is back with Python Projects 🤣
Not funny
@@alphagaming5432 Thanks
You are write I was been waiting for this.
Code with Harry : "God of coding "
Very hard working programming tutor I have ever seen on UA-cam ❤️
Hello friends I created a game so you please watch this video
ua-cam.com/video/lvYI9hBkrZM/v-deo.html
Yah bro
Really he is god
God?? Are you kidding bro 😂
God is only one
Harry Bhai .. yes we need a latest python 2022 course
Thank you for your effort ..
respect ✌✌
Yes, we need the latest Python course for 2022.
Yrr Jo hai pahle vo karlo naaa....!
ya
@@ababakr_asa uuu
@@aishwaryakolur6390 yes it's meeeee.... Any doubts.
Yes we want powerful python course 2022 regarding placements plz make videos as soon as possible
Truly , Your vides are really helpful
Plz start as soon as possible
Hello friends I created a game so you please watch this video
ua-cam.com/video/lvYI9hBkrZM/v-deo.html
Yes sir please .....its a humble request .....🙏🙏🙏🙏🙏
Yes we want new Python course in version 3+
Pehli baar HARRY BHAI KA KUCH SAMJH NHI AAYA 😭😭😭
And I also needed a SQL course as it is highly demanded now a days
Also make videos on SQL
Yes sir we would Love to see Your Python 2022 Tutorial Because your teaching and coding skillls are so good we want a Python 2022 course from you!! ❤❤❤❤❤❤
Hello friends I created a game so you please watch this video
ua-cam.com/video/lvYI9hBkrZM/v-deo.html
Please make brand New pathon programming full basic and advanced course 🙏.
I also created tic tac Toe in python some days before
Bro you are amazing ☺️
Nice 👍🏿 i subscribed you
👍
Python 2022 Beginner course banao please 🥺🥺🥺
yes we want new python course
@Woah! But not for all
Already it is on his channel.
Check!
What if koi same place pr again apni turn chal de to vo overwrite ho jayega na..??? @CodeWithHarry
23:26 Python 2022 pe ek video bna do Harry Bhai 🙏🙏 with some special modules and packages also if it contains DSA then it'll be🔥🔥🔥
Sofware Company: CodeWithHarry hum apko hire karte hai humari company me.
Harry Bhai: Programming skills dekhke hire karoge kya,
UA-camr hai mai.🔥
These python projects are very useful
Thank you Harry.
Hello friends I created a game so you please watch this video
ua-cam.com/video/lvYI9hBkrZM/v-deo.html
Blessed to have you sir!!!😇
We would love to see a latest python playlist 🔥🔥🔥
Oh my goodness what a chance!
I am currently learning react js from the documentation in which they are explaining the code of a tic tac toe game in react and suddenly the notification pops up about tic tac toe by harry
Make a new python course harry bhai
You are one of the greatest UA-camrs
Sir make a projects in C language. Please 🙏🥺🥺
Hello Harry , I am passed out in 2018 & from 2018-22 year I was start for government exam preparation like Railway, State exam but the exams are more delay. Then I watched your some videos on python course , I like coding , now I am more interested. Please start *PYTHON* 2022 Tutorials.
Old harry is back with python projects 😂 👍
this is my code, its more readable but quite long
from click import clear
board_fin=[' ',' ',' ',' ',' ',' ',' ',' ',' ']
board_cord=[j for j in range(1,10)]
board=board_cord.copy()
inp=[]
def print_board (board_of_fn):
print (f"{board_of_fn[0]}|{board_of_fn[1]}|{board_of_fn[2]}")
print("------")
print (f"{board_of_fn[3]}|{board_of_fn[4]}|{board_of_fn[5]}")
print("------")
print (f"{board_of_fn[6]}|{board_of_fn[7]}|{board_of_fn[8]}")
turn=1
where=10
while True:
for i in [0,3,6]:#horizontal check
if board[i]==board[i+1]==board[i+2]!=' ':
print_board(board_fin)
print (f"{board[i]} is the winner")
exit()
for i in [0,1,2]:#vertical check
if board[i]==board[i+3]==board[i+6] and board[i]!=' ':
print_board(board_fin)
print (f"{board[i]} is the winner")
exit()
if board[0]==board[4]==board[8]!=" " or board[2]==board[4]==board[6]!=" ":#diagonal check
print_board(board_fin)
print (f"{board[4]} is the winner")
exit()
elif len(inp)==9:
print_board(board_fin)
print ("Its a DRAW")
exit()
# print_board(board_cord)
print_board(board)
while True:
if turn==1:
XO='X'
else :
XO='0'
where=int(input(f"Where do you want {XO} to be : "))
if where in inp :
print(f"You already have {board[(where-1)]} at {where}")
elif where >9:
print("please write a position from 1 to 9")
else:
if turn==1:
inp.append(where)
board[(where-1)]='X'
board_fin[(where-1)]='X'
turn=0
clear()
break
else:
inp.append(where)
board[(where-1)]='0'
board_fin[(where-1)]='0'
turn=1
clear()
break
Yes we want a new python tutorial please sir it will be very helpful if you do so..
The student who has done Zoology Honors can also do this course and you will give it a job.
Yes Harry bhai,
We want a brand new python couse
i have another easy way to code this .you are genius, i'm not challanging you *THIS CAN BE DONE I EASY WAY* .🐍🐍🐍🐍👌😅
Python3 2022 full course needed.
Lots of love harry bhai ❤️.
Yes we need it that python course plz
Yes we need python project like this ❤️
Sir please 🙏🙏🙏 make latest python course, we want latest python course please 🙏🙏🙏🙏🙏
Python course latest pls 🙏🙏🙏
I got selected in a Capgemini😍Training is started already and I got a domain as AWS + PYTHON + PYSPARK🥰So can u please make a video on this topics to cover all the basic concepts in detail😁Please please I need this course🙏🙏
To'
The teacher
Harry sir,
coding class
subject=we want new python corse
dear sir,
sir please make a new python vidio.
your suscriber
Aakash Ranjan
We need a new python course ...
Bro which version of python is used in this project please tell me
Yess Harry bhaiya we want a new python course!! 😍🔥🤎
bhai banya howa ha pele
Yes sir please create python 3.10 playlist 2022 . I'm waiting 🙌
I'm a 13 year old Python programmer..This video really helped.I was stucked in the section of game making...but it became clear for me.❤you Harry bhai
same i am also 13, and i am a python and java programmer, and i am learning both of them.
me too a 3-year-old programmer currently working as an intern in google :)
@@akashpaul4143💀
bahut nice bhaya .. but wifi ya bluetooth se ludo king game ka controller kaise banaye please banao na .. log connect karke dikhate h ludo controller k ko wifi se and ludo game ko control karte h dusre phone se wifi ke dwara ..humare pass ludo king ka controller apps bhi h but us se kuch control nhi hota game me ..please kya aap help kar sakte ho ?
Harry bhai be like : Mai rukega NHi sala 🤣
Love you Harry bhai ❤
he is not a new person who tech cs on youtube ,therefore he not introduce ourself bro understand the fan following of 6 million
Sir we want brand new python course please
13:4 line 11 xstate[7] , in bracket there should be eight
Bhiya aap jo coding mai shortskey use krte h unki ek video please bna dijiye for beginners please 🙏 ❤
yes i want new python coarse because i am beginner in python
Harry bhai aap aisa turn = int(not bool(turn)) karsakte the at 15:14
X input krne ke baad...usi place pe 0 inter krne pe X replace ho rha h 0 se
Sir I personally donot like coding but I like ethical hacking but still I follow your channel every day
Bhaiya mere vs code Mai run krne ke option hi nhi aa rha hai or agr Mai upar se jaakr run krta hu To run nhi ho rha hai.
Plzz help me
Thanks sir 🙏
Sir with animation how to make sir
Kya hum tkinter ka use kar sakte hai please tell me sir 🙏
When he ask me enter a value I put the value and it did not return anything Pls tell harry sir
2048 to Tic-Tac-Toe code required sir please send
Sir pls latest powerful python couse 2022 🙏🙏🙏🙏
hello harry bhai,
we need the latest Python course for 2022.
Sir maine pura code dekh dekhkar likha tha, diagonally wins me issue hai
Bro this source code only showing the winner but not the draw or something
Ise GUI platform de kr bta do
So that GUI bhi clear ho jay
Its my request to you please make video on this.
Latest 2022 python course would be very much appreciated!! 🙏🙏
sum 3 kese hoga thoda smjh nhi aaya (in 23th line)
Harry bhai we want a python 2022 tutorial from starting to end... Sir please make it.... I want to learn it sir please I am here bcuz of your teaching skills... I hope you will read my comment... 😊
mujhe chahiye brand new 2022 python tutorials .
"pass" or simply write "..." (three dots) instead of pass
Please make a PYTHON 2022 COURSE!!!!😊😊
Harry bhaiya ek discord bot ka bhi project bana do using python
Yes please we need nee python course on new teck also about web3.0
yes we need a latest course of python 2022
Kya ise python me bna sakte hai bina vscode ke
yes not only me every one wants new python course
Sir we want Python Latest 2022 Course!!!!
Sir plese make more game tutorials in pygame and python
We want python latest 2022 course with Opencv
23:51 YES SIR!! YES YES YES .... ek new course le aaiye python k liye please :) as you said
Are you doing this for first time everytime you said ohh no hum aisey krenge ohhh nhi acha krtey hai.yaaar phle kudh prepare ho Jaya kro.totaly waste of time
CWH is a trash and clown in front of serious coders and developers . He is a hero for newbies and kids of schools.
latest pyton course chaiye bhaiya please lao
Harry Bhai make Python+DSA course
Please making a playlist on data structure and algorithm in python.
# Initialize an empty board with 9 spaces
board = [" "] * 9
# Define a function to print the board
def print_board():
print(f"{board[0]} | {board[1]} | {board[2]}")
print(f"{board[3]} | {board[4]} | {board[5]}")
print(f"{board[6]} | {board[7]} | {board[8]}")
# Define a function to check if there is a winner
def check_winner(player):
# Check rows
for i in range(0, 9, 3):
if board[i] == board[i+1] == board[i+2] == player:
return True
# Check columns
for i in range(3):
if board[i] == board[i+3] == board[i+6] == player:
return True
# Check diagonals
if board[0] == board[4] == board[8] == player or board[2] == board[4] == board[6] == player:
return True
return False
# Define a function to play the game
def play_game():
# Initialize variables
player = "X"
game_over = False
# Loop until game is over
while not game_over:
# Print the board
print_board()
# Get input from the current player
position = int(input(f"{player}'s turn. Enter a position (0-8): "))
# Check if the position is valid
if position < 0 or position > 8 or board[position] != " ":
print("Invalid position. Try again.")
continue
# Update the board with the player's move
board[position] = player
# Check if the game is over
if check_winner(player):
print_board()
print(f"{player} wins!")
game_over = True
elif " " not in board:
print_board()
print("It's a tie!")
game_over = True
# Switch to the other player's turn
player = "O" if player == "X" else "X"
# Play the game
play_game()
Wo need python new course vote here 👇
Sir plzz make one short video on SQL it will really helpful for us
Yes sir i do want latest 2022 Python course
New PYTHON COURSE CHAHIYE
PLS BHAIYA...
Ji Harry SIR chaiya Latest Python course
Please sir make new couse for python 3
Latest python ka course jarur bano Harry Bhai
Harry bhaiya aur python project karwao na 😀😀
We want 2022 python tutorial
We want 2022 python🙏🙏🙏🙏🙏🙏🙏
Error : overwrite kar sakte ha X par O aur O par X ko
Plz make a video on weather forecast python project
And make more videos on python projects at company levels that make a powerful impact in comapny
For placement
Plz make more videos wr really want them
Sir please make python playlist 2022
When I want to See tutorial of any language
"Harry Bhai be Like":- Tension Nahi Lene ka Apun Hai Na😅😅
Please make a gui series in CPP plzz bro
Hello Harry Bhai pls make full python basic and advanced course video. Please I am waiting 🙏🙏🙏...
Indian Market Automated order Executions for Retailers- please do a project on this, couldn't finy any helpful resource! Thanks!
vs code me Npm packages ko install nahi kar pa raha ...error aa raha set proxy config wala , proxy bhi set kar liye but phir v kuch nahi ho para ,koi help kar ske do mar do guys sabhi Google aur UA-cam karne par bhi koi solution nahi mila, web development ke playlists me mai npm wale topic se aage nahi badh pa raha isi vajah se
Your programming 🎥 videos are really very helpful, powerful for every learner
Code with harry : God of Indian programmer
G harry bhai please make the course on python with projects & Also Compare next js as fronend & Strapi , Django as backend... for production Projects...