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:
- Python Expressions
- Python Floating Point
- IEEE Standard for Floating-Point Arithmetic (IEEE 754)
- Exploring HTTPS and Cryptography in Python
- Decimal Module
- Standard operators as functions
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.