+ 1
I need definitions
Since i study math in french, i just need to know what everything actually means
2 ответов
+ 1
like for python, whats // and %
0
% is modulus like a%b here you just keep subtracting untill you get a number between 0 and b
for example
4%2=
4-2=2 (2 is still equal or greater than 2)
2-2=0 (the modulus here is 0)
another one
13 % 4
13>=4? (true)
13-4=9
9>=4? (true)
9-4=5
5>=4? (true)
5-4=1
1>=4? (false)
modulus = 1