I created a tic-tac-toe game for Codecademy's CS 101 Introduction to Programming. The task was to create a program that can be played with family and friends. The project objectives were as follows:
- Build a terminal program using Python
- Add at least one interactive feature using input()
- Use Git version control
- Use the command line and file navigation
- Write a technical blog post on the project
The program starts with creating a tic-tac-toe board. Each square is given a number 1 through 9. Player 1 can enter a number to place an X in the chosen square. Then the computer places a O in a random square. After each play, the program checks if either player has three in a row. If there is, someone wins. Otherwise, the game continues until all the squares are full and the game ends in a tie.
The following is a link to the code on GitHub:
https://github.com/mjp286/tic_tac_toe.git
This is a basic code for a simple game, but it was fun to do. It's a good way to practice python. Give it a try and let me know what you think.
Top comments (1)
Sounds like a fun project using Python @mjp286. FYI the URL is returning a 404 error, unfortunately.