Part 3: Reorganising the code #3

Merged
Tirsvad merged 1 commits from part-3-reorganising-code into main 2026-10-04 07:26:15 +02:00
Owner

Merges encoding and decoding into one shared caesar(text, shift, direction) function (encrypt/decrypt remain as thin wrappers), adds the interactive encode/decode loop with input validation and a "go again" prompt, adds a coloured ASCII title (plain when not a TTY or NO_COLOR is set), and extends tests and docs.

Part 3 of 3 (Part 1: #1, Part 2: #2).

Merges encoding and decoding into one shared `caesar(text, shift, direction)` function (`encrypt`/`decrypt` remain as thin wrappers), adds the interactive encode/decode loop with input validation and a "go again" prompt, adds a coloured ASCII title (plain when not a TTY or NO_COLOR is set), and extends tests and docs. Part 3 of 3 (Part 1: #1, Part 2: #2).
Tirsvad added 1 commit 2026-10-04 07:24:26 +02:00
- Replace separate encrypt/decrypt with shared caesar() function
- Add direction constants (DIRECTION_ENCODE, DIRECTION_DECODE) and
  prompts
- Update main.py to support interactive encode/decode loop
- Keep encrypt/decrypt as wrappers for backward compatibility
- Add tests for caesar() with both directions and error handling
- Update tests for main.py with interactive scenario tests
Tirsvad merged commit 27952755d3 into main 2026-10-04 07:26:15 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100_days_of_code/008-caesar_cipher#3