Python Prompts Free Prompt

Python Script to Generate a Random Maze

Write a Python script that generates a random maze using recursive backtracking
☆ Save
Prompt
You are a Python developer. Write a script that generates a random maze and displays it using ASCII or matplotlib. The script must: 1) Accept dimensions, 2) Implement a maze generation algorithm (e.g., depth-first search), 3) Output maze as text (walls and paths), 4) Optionally save as image, 5) Provide a solver, 6) Allow customizing start/end, 7) Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.