DEV Community

loading...

Tic Tac Toe Python The Classic TicTacToe Game in Python

jamesshah profile image James Shah ・1 min read

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.

So, when I started to learn Python, I started with this No Starch Press published book “Automate The Boring Stuff With Python” which is just awesome and If you are looking for a book to get started learning python, I would recommend you to go through this book. Its very beginner-friendly and it covers almost all the basic topics of python. So, while solving the exercises in this book, I came across this TicTacToe game implementation in python.

And Now Play Time:

TicTacToe

Checkout the Full code explanation here.

Discussion (5)

Collapse
highcenburg profile image
Vicente G. Reyes

Could you please add more context to this post?

Collapse
jamesshah profile image
James Shah Author

Sure. Can you elaborate particularly what should i add/change?

Collapse
highcenburg profile image
Vicente G. Reyes

Sure. As a community mod, I find this purely promotional.

You can add at least 1 or 2 snippets of code with an explanation of what they do.

Cheers

Thread Thread
jamesshah profile image
James Shah Author

Okay. Changed it. Thanks for the suggestion.

Collapse
anik2000s profile image
anik2000s

if count == 9:
print("\nGame Over.\n")

print("It's a Tie!!")

I think after this line a break is missing.

Forem Open with the Forem app