Skip to content

amoghakella/python-hobby-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Fun Python Projects

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.


1. 4×4 Sudoku Solver

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.

Usage

Run the solver with:

python3 4x4-sudoku_solver.py

You will be prompted to enter the puzzle row by row. Use:

  • Numbers 1–4 for filled cells
  • x for 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.


2. Launching Projectiles Solver

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)

Usage

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.py

The program prints the results rounded to two decimal places.


Requirements

  • Python 3.x
  • No external dependencies (uses only the standard library)

License

This repository is shared for educational and personal hobby use. Feel free to explore, adapt, and modify.

About

Python code. By amoghakella

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages