At first glance, the Python modulo operator may not grab your attention. Yet, as you’ve seen, there’s so much to this humble operator. From checking for even numbers to encrypting text with ciphers, you’ve seen many different uses for the modulo operator.
In this course, you’ve learned how to:
- Use the modulo operator with
int
,float
,math.fmod()
,divmod()
, anddecimal.Decimal
- Calculate the results of a modulo operation
- Solve real-world problems using the modulo operator
- Override
.__mod__()
in your own classes to use them with the modulo operator
Here are additional resources about python expressions, floating point arithmetic, cryptography, and more: