PLAY WITH PYTHON TRINKET | PROGRAMS – SHOUT CODERS

10 Likes Comment

Play Snake. Eat the food at the coordinate point, but don’t eat yourself! In the game of Snake, the player uses the arrow keys to move a “snake” around the board. As the snake finds food, it eats the food, and thereby grows larger. The game ends when the snake either moves off the screen or moves into itself.

WORLD RECORD :

Medusa, a reticulated python, clocked in at 7.67 meters (25 feet, 2 inches) long in its official world record measurement, on October 12, 2011.

You need some free game module to run this program.

  • Turtle module
  • Random module
  • Freegames module

To install turtle – Turtle graphics, check this link:
https://docs.python.org/3/library/turtle.html

To install freegames, check this link:
https://pypi.org/project/freegames/

To know more about onkey() function, check this link:
https://docs.python.org/2/library/turtle.html

2. COLOR SPIRAL

3. ROSE PAINTING

4. TREE BRANCHES

5. DRAW TREE

6. CHRISTMAS TREE

7. PIGLET PAGE

8. COLORED LIGHT SPHERE

9. SPRING COLOR TUNNEL

10. LAYER CAKE CHALLENGE

PART 2: shapes.py

11. CONFESSION

12. LITTLE YELLOW MAN

Python is an excellent choice for rapid prototyping of games. But it has limits with performance. Therefore for more resource-intensive games, you should consider the industry standard which is C# with Unity or C++ with Unreal. Some popular games like EVE Online and Pirates of the Caribbean were created using Python.

You might like

Saif

About the Author: Saif

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami