I ran this code
x = 2
y = 6
print(x%y)
Output
2
What did '%' exactly do?
I ran this code
x = 2
y = 6
print(x%y)
Output
2
What did '%' exactly do?
It's the modulo operator, it gives the rest from a division that doesn't give an integer( or 0 if the division gives an integer)
So 10 modulo 4 is 2 since 10-4*2=2