+1 vote
1 view
in Python by (47.8k points)

Is there a modulo function in the python math library?

Isn't 15 % 4, 3? But 15 mod 4 is 1, right?

1 Answer

0 votes
by (107k points)
edited by

You can use the modulo operator(%), it gives you the remainder as well as the modulo.

See the example below:-

15 % 4

image

To know more about this you can have a look at the following video:-

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...