Modulus

Course Content

What is the modulus function?

The modulus function or operator gives the remainder of a division. In some languages it is accessed by a predefined function but in Python is performed using the % operator

So the operation carried out is 10 / 3 which equals 3 remainder 1. So the result is 1.

Gives the following output

Remainder = 1