Number Snake Generator v1 is a Python desktop application for creating educational arithmetic puzzles called Number Snakes.
This repository contains the full source code, allowing you to generate step-by-step solvable puzzles, customize difficulty, preview grids live, and export puzzles in PDF or JPG formats for classrooms, homework, or personal practice.
- 🧩 Multi-Puzzle Generation — Create one or many puzzles at once
- 📐 Adjustable Grid & Difficulty — Easy (3×3), Medium (4×4), Hard (5×5)
- 🔢 Randomized Numbers & Operations — Unique puzzles every time
- 👀 Live Preview — Instantly view the puzzle grid in the GUI
- 🎯 Highlighted Solution Path — Start/end arrows for easy navigation
- 💡 Step-by-Step Solution — Automatically generated for every puzzle
- 🖼 PDF Export — Single, multiple separate PDFs, or combined PDF worksheets
- 🖼 JPG Export — Individual puzzle images with full solution
- 🖥 Dark-Themed Modern UI — Built with Tkinter + ttkbootstrap
- 🔒 Fully Offline:
- No internet required
- Local puzzle generation and exports only
- ⚡ Fast Rendering — Lightweight and efficient puzzle creation
- 🧰 Portable Desktop Tool — Can be compiled into a standalone executable
- Clone or download this repository:
git clone https://github.com/rogers-cyber/NumberSnakeGenerator.git
cd NumberSnakeGenerator- Install required Python packages:
pip install ttkbootstrap reportlab pillow(Tkinter is included with standard Python installations.)
- Run the application:
python NumberSnakeGenerator.py- Optional: Build a standalone executable using PyInstaller:
pyinstaller --onefile --windowed NumberSnakeGenerator.py-
Configure Puzzle Options:
- Select difficulty: Easy (3×3), Medium (4×4), Hard (5×5)
- Set the number of puzzles to generate
-
Generate Puzzle:
- 🧩 Generate Single Puzzle — preview in the GUI
- 📄 Multiple Puzzles (Combined PDF) — export multiple puzzles to one PDF
- 📂 Multiple Puzzles (Separate PDFs) — each puzzle gets its own PDF
- 🖼 Multiple Puzzles (Separate JPGs) — export puzzles as images
-
View Solution:
- The solution panel shows step-by-step operations along the Number Snake path
-
Clear Puzzle:
- Click 🧹 Clear to reset the grid
-
About:
- Click ℹ About to view full instructions and feature overview
| Option | Description |
|---|---|
| Difficulty | Easy (3×3), Medium (4×4), Hard (5×5) |
| Number of Puzzles | Total puzzles to generate at once |
| Export Format | PDF (single, separate, or combined) or JPG |
| Live Preview | Real-time visual feedback of the puzzle grid |
| Theme / UI | Dark-themed modern interface (ttkbootstrap) |
| Solution Display | Step-by-step arithmetic operations |
- NumberSnake_1.pdf, NumberSnake_2.pdf, … — Individual puzzle PDFs
- Combined NumberSnake.pdf — All puzzles in one PDF
- NumberSnake_1.jpg, NumberSnake_2.jpg, … — Individual puzzle images with solution
All files are saved to your selected output directory.
- Python 3.10+
- Tkinter — Standard Python GUI framework
- ttkbootstrap — Modern themed UI
- reportlab — PDF generation
- Pillow — Image rendering support
- pathlib, random, operator — Core application logic
- Puzzles use randomized numbers and arithmetic operations for variety.
- Solution paths are visually highlighted and include start/end arrows.
- Exported PDFs and JPGs include both the puzzle grid and full solution.
- Fully offline workflow — no internet connection required.
- Suitable for classrooms, homework exercises, math clubs, and enrichment programs.
Number Snake Generator v1 is maintained by Mate Technologies, delivering fun, visual, and educational arithmetic puzzles for students.
Website: https://matetools.gumroad.com
Distributed as commercial source code.
You may use it for personal or educational projects.
Redistribution, resale, or rebranding as a competing product is not allowed.
