Note: This does not have any test driven exercises. There is no Run Test button and the icon next to the title above has a book instead of a lab. There are code cells below for you to practice concepts, but occassionally lessons won't have tests.
If you don't remember Modular Arithmetic, it's this function in python
39 % 12
The result is 3 because that is the remainder after division (39 / 12 == 3 + 3/12).
Some people like to call it "wrap-around" math. If it helps, think of modular arithmetic like a clock:
Think of taking the modulo as asking the question "what hour will it be 39 hours from now?"
If you're still confused, please take a look at this article.
print(39 % 12)
Find the modulo 19 of these numbers:
- 99
- \(456 \cdot 444\)
- \(9^{77}\)
(note python uses ** to do exponentiation)
prime = 19
# 99
# 456*444
# 9**77