Coders Packet

TIC-TAC-TOE using Python and SQL Database connectivity

By Pallak Singhal

A puzzled Game(tic-tac-toe) is a 2 players game which is built in Python with database connectivity.

Hopefully,this game is played by almost everyone at their childhood on pen-paper but still if you didn't play this game ever , it is good to learn something new :)

 Lets discuss the rules of this game i.e. TIC-TAC-TOE


1. The game is played on a grid that's 3 squares by 3 squares.

2. You are X, your friend is O. Players take turns one by one and putting their marks in empty squares.

3. The first player to get 3 of her marks in a row ( up, down, diagonally) is the winner.

4. When all 9 squares are full or one of them is getting win then the game should be end, If no player has 3 markes in a row,column or diagonally then the game should be Tie. 


On this basis, i built the program by using Python code and connect it through the database so that we can access the details in the future also.


Download Complete Code


  • Anonymous :

    I can't get the code from the folder. So, could you please create a word file in which the code is there? Please!

  • Reply to this comment