Tag Archives for python

Python Recursive Maze Example

Here is a small python script that creates a maze to illustrate the concept of recursion.  Hopefully the comments help clear up any confusion some new programmers might have about how it works. #!/usr/bin/env python “”"maze.py: Creates a maze to illustrate recursion.”"” import random def makeMaze(width, height): “”"Initializes an 2D list for the maze then [...]

Posted in Uncategorized | Also tagged , Leave a comment