One of my very first real projects in my Grade 11 Computer Science class was to create a snake game using Python 3.X, together with a semi well-known library called PyGame.
Orignially, the project was supposed to be built off of a prebuilt template that the teacher provided us, but I didn't really like that so instead I opted for building my own version, using object oriented programming concepts, which at the time of writing this game, we did not learn.
Anyway, this is my first real Python program that uses classes.
I ended up getting 100% on this project.
This game runs off of a Python Library called PyGame, and the installation of PyGame is required.
To install PyGame on a unix based system (does not include Mac):
python3 -m pip install pygame --user
To install PyGame on a Windows system:
py -m pip install pygame --user
To install on a Mac or anywhere else, I suggest you Google it.
Right well this is easy.
Navigate to the folder where all the game information is stored in CMD or Terminal and enter the following command:
On Windows:
game.py
Unix:
python game.py
If you have both python2 and python3 installed, run
python3 game.py
-
PyGame - The Python Library I used
-
JetBrain PyCharm CE - The IDE I used. Highly recommended as opposed to the regular shell.
-
Python 3 - Duh.