+ 1
what mean % in python ?
13 Réponses
+ 14
That's modulo operator. It returns the remainder from division of two numbers.
3 % 2 = 1;
2 % 2 = 0;
10 % 6 = 4;
5 % 10 = 5;
+ 8
modulus
+ 8
remainder division
+ 4
>>> x = 63%10
>>> print(x)
3
>>>
the first number is devided by the second one, what remains is the result.
result = first%second
+ 3
means ?
+ 3
like 30%5
+ 3
OK thx
+ 3
:)
+ 2
gives you the leftovers after dividing down.
4%2 = 0
10%2 = 0
7%2 = 1
one use is decide if a number is even or odd. if number%2==2 then number is even
0
so 10%2= 5 ? or 8..
0
si its like minus - ?
0
10%2=0 .. if divides 10 by 2 until it can't anymore and returns the leftover
0
% denote Remainder. you will divide any number from any number then remaining any number its called remainder.👍