This repository contains two small Python programs I wrote in high school, mostly for fun and as a way to practice programming. They are independent of each other and can be run separately.
4x4-sudoku_solver.py– a solver for 4×4 Sudoku puzzles (with or without 2×2 sub-squares).launching_projectiles_solver.py– a physics-based calculator for projectile motion when launching from a cliff.
Both are standalone scripts written in Python, and require only the standard library.
This program attempts to solve a 4×4 Sudoku puzzle.
- By default, it enforces 2×2 sub-square rules in addition to row/column uniqueness.
- If you want a version without sub-squares, comment out lines 49–64 and 120–132 of the file.
Run the solver with:
python3 4x4-sudoku_solver.pyYou will be prompted to enter the puzzle row by row. Use:
- Numbers
1–4for filled cells xfor an empty cell- Spaces between entries
Example input row:
x x 1 2
The program will output all valid solutions, or notify you if none exist.
This script computes flight characteristics of a projectile launched from a height with an initial velocity and angle.
It calculates:
- Airtime
- Horizontal distance traveled
- Impact velocity
- Impact angle (below the horizontal)
Open launching_projectiles_solver.py and modify the parameter values near the top of the file:
heightover = 1.17 # Launch height above ground (m)
velocity = 8.123 # Initial speed (m/s)
angle = 30 # Launch angle (degrees)
gravity = 9.8 # Gravitational acceleration (m/s^2)Then run:
python3 launching_projectiles_solver.pyThe program prints the results rounded to two decimal places.
- Python 3.x
- No external dependencies (uses only the standard library)
This repository is shared for educational and personal hobby use. Feel free to explore, adapt, and modify.