We are going to created a tic tac toe game using python
Tic-tac-toe is a very popular game, so this game is implemented using Python. So, the best and the most fun way to learn any programming language for me has always been by developing a fun project like a simple game or some project that I would use in my daily life.
- | - | -
- | - | -
- | - | -
X's turn.
Choose a position from 1-9:
1
X | - | -
- | - | -
- | - | -
O's turn.
Choose a position from 1-9:
2
X | O | -
- | - | -
- | - | -
X's turn.
Choose a position from 1-9:
5
X | O | -
-| X | -
-| - | -
O's turn.
Choose a position from 1-9:
5
You cant go there. Go again.
Invalid input. Choose a position from 1-9:
4
X | O | -
O | X | -
- | - | -
X's turn.
Choose a position from 1-9:
9
X | O | -
O | X | -
- | - | X
X Won.
Open Terminal and type command
git clone https://github.com/nabeelraza-7/tic_tak_to_game_python
Write following lines in the terminal
cd tic_tak_to_game_python
Open Folder any IDE in that folder (if the terminal is not of any IDE)
- Python
- tkinter
- PyQt5