0
What '%' symbol mean in python?
7 Respostas
+ 3
It is known as "Modulo " operator, it gives us the remainder of a particular formula . example- 5% 2 results in 1.
+ 2
5 % 2 = 1 5 // 2 = 4
+ 2
yes
+ 1
mod is operation finds the remainder after division
example 7%2 , the result of division is 7/2 = 3 and the remainder is 1
so 7%2 = 1
0
% is mod
0
is it means remainder in division??
0
Think of 5%2 as =what is the remainder of 5/2.
5/2=2
remainder=1
5%2=1