Add a Caesar cipher encode/decode script to scripts/.
Why
Smallest possible introduction to string manipulation, modular arithmetic, and the idea of a reversible transformation. Also a nice lead-in to "why this is not real encryption".
Suggested file
scripts/caesar_cipher.py
What it should do
python scripts/caesar_cipher.py encode "hello world" --shift 3
python scripts/caesar_cipher.py decode "khoor zruog" --shift 3
- Bonus:
--brute-force on decode, printing all 25 candidate shifts.
Acceptance criteria
Inspiration
caesar_cipher from Awesome-Python-Scripts.
Good first issue — comment below to get assigned.
Add a Caesar cipher encode/decode script to
scripts/.Why
Smallest possible introduction to string manipulation, modular arithmetic, and the idea of a reversible transformation. Also a nice lead-in to "why this is not real encryption".
Suggested file
scripts/caesar_cipher.pyWhat it should do
python scripts/caesar_cipher.py encode "hello world" --shift 3python scripts/caesar_cipher.py decode "khoor zruog" --shift 3--brute-forceon decode, printing all 25 candidate shifts.Acceptance criteria
assert-based self-check underif __name__ == "__main__":or a tinytest_caesar_cipher.pyproving the round-trip.Inspiration
caesar_cipher from Awesome-Python-Scripts.
Good first issue — comment below to get assigned.