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 😉😉

КОМЕНТАРІ • 928

  • @CodeWithHarry
    @CodeWithHarry  2 роки тому +664

    Who wants projects in C Language?

  • @natyacodes
    @natyacodes 2 роки тому +107

    the fact that he started the project without any introduction shows that how much he cares about our time

  • @haha-po8ro
    @haha-po8ro 2 роки тому +90

    Old Harry is back with Python Projects 🤣

  • @arpancs
    @arpancs 2 роки тому +149

    Code with Harry : "God of coding "
    Very hard working programming tutor I have ever seen on UA-cam ❤️

  • @daredevil013
    @daredevil013 2 роки тому +59

    Harry Bhai .. yes we need a latest python 2022 course
    Thank you for your effort ..
    respect ✌✌

  • @sakalagamingyt3563
    @sakalagamingyt3563 2 роки тому +86

    Yes, we need the latest Python course for 2022.

  • @PalakGupta-bi7kt
    @PalakGupta-bi7kt 2 роки тому +32

    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

    • @CodingSkillsOfficial
      @CodingSkillsOfficial 2 роки тому

      Hello friends I created a game so you please watch this video
      ua-cam.com/video/lvYI9hBkrZM/v-deo.html

    • @saikatbera413
      @saikatbera413 2 роки тому

      Yes sir please .....its a humble request .....🙏🙏🙏🙏🙏

  • @sandeepmalviya3166
    @sandeepmalviya3166 2 роки тому +16

    Yes we want new Python course in version 3+

  • @shivendrabhardwaj7217
    @shivendrabhardwaj7217 2 роки тому +4

    Pehli baar HARRY BHAI KA KUCH SAMJH NHI AAYA 😭😭😭

  • @PalakGupta-bi7kt
    @PalakGupta-bi7kt 2 роки тому +9

    And I also needed a SQL course as it is highly demanded now a days
    Also make videos on SQL

  • @dhairyachavand3933
    @dhairyachavand3933 2 роки тому +35

    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!! ❤❤❤❤❤❤

    • @CodingSkillsOfficial
      @CodingSkillsOfficial 2 роки тому

      Hello friends I created a game so you please watch this video
      ua-cam.com/video/lvYI9hBkrZM/v-deo.html

  • @nandaraghuvanshi7186
    @nandaraghuvanshi7186 2 роки тому +5

    Please make brand New pathon programming full basic and advanced course 🙏.

  • @computerlover8775
    @computerlover8775 2 роки тому +8

    I also created tic tac Toe in python some days before

  • @nine8823
    @nine8823 2 роки тому +2

    Python 2022 Beginner course banao please 🥺🥺🥺

  • @yashgupta0411
    @yashgupta0411 2 роки тому +16

    yes we want new python course

  • @LDR_Crafts
    @LDR_Crafts Рік тому +2

    What if koi same place pr again apni turn chal de to vo overwrite ho jayega na..??? @CodeWithHarry

  • @abhinavvarshney6366
    @abhinavvarshney6366 2 роки тому +4

    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🔥🔥🔥

  • @codewithkiran
    @codewithkiran 2 роки тому +2

    Sofware Company: CodeWithHarry hum apko hire karte hai humari company me.
    Harry Bhai: Programming skills dekhke hire karoge kya,
    UA-camr hai mai.🔥

  • @sauravgawali1358
    @sauravgawali1358 2 роки тому +16

    These python projects are very useful
    Thank you Harry.

    • @CodingSkillsOfficial
      @CodingSkillsOfficial 2 роки тому

      Hello friends I created a game so you please watch this video
      ua-cam.com/video/lvYI9hBkrZM/v-deo.html

  • @ysedits...
    @ysedits... 2 роки тому +12

    Blessed to have you sir!!!😇
    We would love to see a latest python playlist 🔥🔥🔥

  • @haha-po8ro
    @haha-po8ro 2 роки тому +5

    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

  • @tousifjaved3485
    @tousifjaved3485 2 роки тому +2

    Make a new python course harry bhai
    You are one of the greatest UA-camrs

  • @MuhammadJamil-ho6wl
    @MuhammadJamil-ho6wl 2 роки тому +3

    Sir make a projects in C language. Please 🙏🥺🥺

  • @onkarpatil7341
    @onkarpatil7341 2 роки тому

    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.

  • @addictedcoderz6894
    @addictedcoderz6894 2 роки тому +6

    Old harry is back with python projects 😂 👍

  • @BhardwajAnsh
    @BhardwajAnsh Рік тому +1

    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

  • @rishabh5657
    @rishabh5657 2 роки тому +4

    Yes we want a new python tutorial please sir it will be very helpful if you do so..

  • @lomashkumar7119
    @lomashkumar7119 2 роки тому

    The student who has done Zoology Honors can also do this course and you will give it a job.

  • @kshitij230
    @kshitij230 2 роки тому +3

    Yes Harry bhai,
    We want a brand new python couse

  • @codewithvdr3766
    @codewithvdr3766 2 роки тому +1

    i have another easy way to code this .you are genius, i'm not challanging you *THIS CAN BE DONE I EASY WAY* .🐍🐍🐍🐍👌😅

  • @soumo.das23
    @soumo.das23 2 роки тому +3

    Python3 2022 full course needed.
    Lots of love harry bhai ❤️.

  • @CodingWithJas
    @CodingWithJas 2 роки тому

    Yes we need it that python course plz

  • @priyankmalviya4367
    @priyankmalviya4367 2 роки тому +7

    Yes we need python project like this ❤️

  • @MukulKumar-fz5ct
    @MukulKumar-fz5ct 2 роки тому +1

    Sir please 🙏🙏🙏 make latest python course, we want latest python course please 🙏🙏🙏🙏🙏
    Python course latest pls 🙏🙏🙏

  • @supriyabharambe2828
    @supriyabharambe2828 2 роки тому +3

    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🙏🙏

  • @audigammer6632
    @audigammer6632 2 роки тому +1

    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

  • @ratankrsaha6849
    @ratankrsaha6849 2 роки тому +3

    We need a new python course ...

  • @hundekarom5862
    @hundekarom5862 Рік тому +1

    Bro which version of python is used in this project please tell me

  • @Robin_141
    @Robin_141 2 роки тому +3

    Yess Harry bhaiya we want a new python course!! 😍🔥🤎

  • @heyadi0
    @heyadi0 2 роки тому +1

    Yes sir please create python 3.10 playlist 2022 . I'm waiting 🙌

  • @quantamlegend79
    @quantamlegend79 Рік тому +3

    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

    • @Edokami
      @Edokami Рік тому +2

      same i am also 13, and i am a python and java programmer, and i am learning both of them.

    • @akashpaul4143
      @akashpaul4143 Рік тому +7

      me too a 3-year-old programmer currently working as an intern in google :)

    • @AyushRawani_
      @AyushRawani_ 9 місяців тому

      ​@@akashpaul4143💀

  • @Kalyugkeraja15
    @Kalyugkeraja15 5 місяців тому +1

    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 ?

  • @PritamSingh018
    @PritamSingh018 2 роки тому +3

    Harry bhai be like : Mai rukega NHi sala 🤣
    Love you Harry bhai ❤

  • @AbhayThakur-qg2tw
    @AbhayThakur-qg2tw Місяць тому +1

    he is not a new person who tech cs on youtube ,therefore he not introduce ourself bro understand the fan following of 6 million

  • @ayushchhetri9145
    @ayushchhetri9145 2 роки тому +1

    Sir we want brand new python course please

  • @rupeshkumar4339
    @rupeshkumar4339 Рік тому +2

    13:4 line 11 xstate[7] , in bracket there should be eight

  • @saifmark320
    @saifmark320 2 роки тому +1

    Bhiya aap jo coding mai shortskey use krte h unki ek video please bna dijiye for beginners please 🙏 ❤

  • @s_s_d-editor
    @s_s_d-editor 2 роки тому +1

    yes i want new python coarse because i am beginner in python

  • @Zaeemtechnical
    @Zaeemtechnical Рік тому +1

    Harry bhai aap aisa turn = int(not bool(turn)) karsakte the at 15:14

  • @motivational_dosee
    @motivational_dosee 2 роки тому +1

    X input krne ke baad...usi place pe 0 inter krne pe X replace ho rha h 0 se

  • @thegamechanger598
    @thegamechanger598 Рік тому +1

    Sir I personally donot like coding but I like ethical hacking but still I follow your channel every day

  • @m_tv8103
    @m_tv8103 Рік тому +1

    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

  • @acientindia7010
    @acientindia7010 2 роки тому +1

    Thanks sir 🙏
    Sir with animation how to make sir
    Kya hum tkinter ka use kar sakte hai please tell me sir 🙏

  • @dhruvpathak4365
    @dhruvpathak4365 2 роки тому +1

    When he ask me enter a value I put the value and it did not return anything Pls tell harry sir

  • @Ccsrabindra2463
    @Ccsrabindra2463 Рік тому +1

    2048 to Tic-Tac-Toe code required sir please send

  • @MukulKumar-fz5ct
    @MukulKumar-fz5ct 2 роки тому +1

    Sir pls latest powerful python couse 2022 🙏🙏🙏🙏

  • @radhabarsaiya881
    @radhabarsaiya881 2 роки тому +1

    hello harry bhai,
    we need the latest Python course for 2022.

  • @adi_ch.10503
    @adi_ch.10503 Рік тому +1

    Sir maine pura code dekh dekhkar likha tha, diagonally wins me issue hai

  • @abhishekkumargupta3950
    @abhishekkumargupta3950 Рік тому +1

    Bro this source code only showing the winner but not the draw or something

  • @tannukumari3187
    @tannukumari3187 2 роки тому +1

    Ise GUI platform de kr bta do
    So that GUI bhi clear ho jay
    Its my request to you please make video on this.

  • @sahil15304
    @sahil15304 2 роки тому +2

    Latest 2022 python course would be very much appreciated!! 🙏🙏

  • @vikashverma3628
    @vikashverma3628 Рік тому +1

    sum 3 kese hoga thoda smjh nhi aaya (in 23th line)

  • @mayanksoni6482
    @mayanksoni6482 2 роки тому

    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... 😊

  • @shaikhadnan8297
    @shaikhadnan8297 2 роки тому +1

    mujhe chahiye brand new 2022 python tutorials .

  • @vaishnavikhandare
    @vaishnavikhandare Рік тому +1

    "pass" or simply write "..." (three dots) instead of pass

  • @adityasinha6999
    @adityasinha6999 2 роки тому +1

    Please make a PYTHON 2022 COURSE!!!!😊😊

  • @AdityaSharma-st8lw
    @AdityaSharma-st8lw 2 роки тому +1

    Harry bhaiya ek discord bot ka bhi project bana do using python

  • @AdityaSingh-tf5qk
    @AdityaSingh-tf5qk 2 роки тому +1

    Yes please we need nee python course on new teck also about web3.0

  • @077_mohitburnwal9
    @077_mohitburnwal9 2 роки тому

    yes we need a latest course of python 2022

  • @lofiii_song
    @lofiii_song Рік тому +1

    Kya ise python me bna sakte hai bina vscode ke

  • @Aliumplayz
    @Aliumplayz 2 роки тому +1

    yes not only me every one wants new python course

  • @ArjunCodess
    @ArjunCodess 2 роки тому +1

    Sir we want Python Latest 2022 Course!!!!

  • @AmanKumar-nd4ju
    @AmanKumar-nd4ju 2 роки тому +1

    Sir plese make more game tutorials in pygame and python

  • @mayankaggarwalxd9253
    @mayankaggarwalxd9253 2 роки тому +1

    We want python latest 2022 course with Opencv

  • @hopes_alive-100
    @hopes_alive-100 2 роки тому

    23:51 YES SIR!! YES YES YES .... ek new course le aaiye python k liye please :) as you said

  • @worldresidency-dz2qg
    @worldresidency-dz2qg Рік тому +1

    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

    • @KoushikDas2005
      @KoushikDas2005 Рік тому +1

      CWH is a trash and clown in front of serious coders and developers . He is a hero for newbies and kids of schools.

  • @anandvardhan8313
    @anandvardhan8313 2 роки тому +1

    latest pyton course chaiye bhaiya please lao

  • @AshutoshPandey-pi9fk
    @AshutoshPandey-pi9fk 2 роки тому +1

    Harry Bhai make Python+DSA course

  • @programmerlovers8071
    @programmerlovers8071 2 роки тому +2

    Please making a playlist on data structure and algorithm in python.

  • @HorrorGoofy
    @HorrorGoofy Рік тому

    # 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()

  • @CRYPTOHACKING
    @CRYPTOHACKING 2 роки тому +1

    Wo need python new course vote here 👇

  • @prathamsharma5016
    @prathamsharma5016 2 роки тому +1

    Sir plzz make one short video on SQL it will really helpful for us

  • @DeepakChoudhary-gz7wm
    @DeepakChoudhary-gz7wm 2 роки тому +1

    Yes sir i do want latest 2022 Python course

  • @sachinmaurya02
    @sachinmaurya02 2 роки тому +1

    New PYTHON COURSE CHAHIYE
    PLS BHAIYA...

  • @harshchauhan3260
    @harshchauhan3260 2 роки тому +1

    Ji Harry SIR chaiya Latest Python course

  • @premjha23
    @premjha23 2 роки тому +1

    Please sir make new couse for python 3

  • @imranshaha7431
    @imranshaha7431 2 роки тому +1

    Latest python ka course jarur bano Harry Bhai

  • @dhruvanand9773
    @dhruvanand9773 2 роки тому +1

    Harry bhaiya aur python project karwao na 😀😀

  • @Vapour63
    @Vapour63 2 роки тому +1

    We want 2022 python tutorial

  • @ashwinarmvlogs
    @ashwinarmvlogs 2 роки тому +1

    We want 2022 python🙏🙏🙏🙏🙏🙏🙏

  • @rakshitsoni
    @rakshitsoni 2 роки тому +1

    Error : overwrite kar sakte ha X par O aur O par X ko

  • @PalakGupta-bi7kt
    @PalakGupta-bi7kt 2 роки тому +1

    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

  • @patnagaming572
    @patnagaming572 2 роки тому +1

    Sir please make python playlist 2022

  • @fmvloggers9230
    @fmvloggers9230 Рік тому +1

    When I want to See tutorial of any language
    "Harry Bhai be Like":- Tension Nahi Lene ka Apun Hai Na😅😅

  • @army10m73
    @army10m73 2 роки тому +1

    Please make a gui series in CPP plzz bro

  • @learnprogrammingwithshoury5578
    @learnprogrammingwithshoury5578 2 роки тому +1

    Hello Harry Bhai pls make full python basic and advanced course video. Please I am waiting 🙏🙏🙏...

  • @ANANDCorp
    @ANANDCorp 2 роки тому

    Indian Market Automated order Executions for Retailers- please do a project on this, couldn't finy any helpful resource! Thanks!

  • @SlayerBhai
    @SlayerBhai 2 роки тому

    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

  • @MukulKumar-fz5ct
    @MukulKumar-fz5ct 2 роки тому +2

    Your programming 🎥 videos are really very helpful, powerful for every learner
    Code with harry : God of Indian programmer

  • @salmanghouridev
    @salmanghouridev 2 роки тому

    G harry bhai please make the course on python with projects & Also Compare next js as fronend & Strapi , Django as backend... for production Projects...