0
I can't figure out what does this symbol mean in python (%) ps: English isn't my native language so I don't understand it a lot.
Thanks
7 Answers
+ 4
So 9 divided by 3 = 3. There's 3 3's in 9. Remainder is a number that's left over, not using decimals.
So 9 divided by 9 has no remainder because it 3 fits into 9 3 times with no leftover. The % in python shows you just the remainder so in this scenario it would return 0. If you did it with a number that didn't fit like 10 % 3, 3 fits into 10 3 times with 1 leftover. The remainder is 1 so this is what 10%3 would return, 1.
+ 2
You use it to find the remainder of a division.
9%3=0
10%3=1
+ 2
Exactly!
Never be afraid to ask for help đ
+ 1
%its a modulo operator
0
I still don't understand i am just 14 and i still haven't learned that in school but thanks for the quick reply
0
Ohhh thanks so much i finally get it like 16%5 that means there is 1 as a leftover thank you both Olivia an Kiibo