AI engineering glossary · Python core
What is modulo?
Modulo (also called remainder operator): The % operator, which returns the remainder left after dividing one number by another. It is used to test even or odd, wrap around a cycle, and check divisibility. For positive divisors the result is never negative in Python.
Modulo: an example
17 % 5 gives 2 because 5 fits three times with 2 left over. n % 2 == 0 tests whether n is even.
Related terms
More Python core terms
Where you learn it
Modulo is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.