Skip to content

Add python-modulo-operator materials folder - #1015

Merged
realpython-bot merged 3 commits into
masterfrom
maintenance/python-modulo-operator-20261206
Dec 6, 2026
Merged

realpython-bot merged 3 commits into
masterfrom
maintenance/python-modulo-operator-20261206

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the companion code folder for Python Modulo Operator (%): How to Use Mod in Python, built during a written-content maintenance pass.

  • One script per practice section: even/odd checks, interval rows, cyclic iteration (turtle), unit conversion, prime numbers, Caesar and Vigenère ciphers, decimal.Decimal, and the custom Student class.
  • REPL echoes from the tutorial became print()/repr() calls. Standard library only, so there is no requirements.txt. The README states Python 3.6 or later, which is the floor from the draft's minimum-python.

Update draft: https://realpython.com/pbjt/blog/post/2771/change/
Trello card: https://trello.com/c/li5439x5

Verification: ran every script with Python 3 and compared the output line by line with the tutorial's REPL output. Everything matched. cyclic_iteration.py ran under xvfb-run for 8 seconds without errors. It draws in an infinite loop by design. Also ran ruff format --check, ruff check (ruff 0.14.1), and dircheck.py, and all three passed.

🤖 Generated with Claude Code

@realpython-bot
realpython-bot merged commit c35c353 into master Dec 6, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-modulo-operator-20261206 branch December 6, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant