Using the Python Modulo % Operator

Publicado el: 11 febrero 2021
en el canal de: Real Python
22,064
278

Python supports a wide range of arithmetic operators that you can use when working with numbers in your code. One of these operators is the modulo operator (%), which returns the remainder of dividing two numbers. Modular operations are useful to check if a number is even or odd, simplifying cycling through data, and doing non-decimal based units conversion.

Python’s % operator’s been around for a long time. The code shown you has all been tested using Python 3.9, but you should be able to use it in pretty much any version of Python.

Click here to learn more: https://realpython.com/courses/python...


En esta página del sitio puede ver el video en línea Using the Python Modulo % Operator de Duración hora minuto segunda en buena calidad , que subió el usuario Real Python 11 febrero 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 22,064 veces y le gustó 278 a los espectadores. Disfruta viendo!