Now, there also is another mathematical operation
which I want to show you
and that's the modulus operation,
the modulus operator,
which is this percentage sign character used as an operator.
Now, if we save this and then run this again,
we see two as a result for using this modulus operator.
And what this modulus operator actually yields as a result
is the remainder,
the remaining part of performing a division here.
And with that, I mean that if we divide ten by four,
we would get two dot five.
But the modulus operator does not return two dot five,
but instead it simply has a look at
how often this number by which we are dividing
fits into this number.
And then what would be the remaining number
that can't be divided.
So here of course, 4 fits into 10 two times.
So it's two times four, and then we have a remainder of two,
because two times four is eight and ten minus eight is two
and modulus always returns us this remainder.
So if I use it again here,
but let's say we now use it with three.
What would you expect here as a remainder?
Well, we should get one as a remainder here
because three fits into ten three times.
And then that gives us nine and ten minus nine is one.
So expected remainder is one.
And if I save this indeed we get one here as a result
and that's the modulus operator.