+ 1
What sign% do?
I didn't understand what sign (%) do?
8 ответов
+ 4
If you have 7 candies and there are 3 children, how many candies can you give to each one?
7 / 3 = 2 (without decimals, they don't want broken candies)
I can give 2 candies to each one and there is one for me. This is the remainder of division.
maybe it isn't too much mathematical... 🤔
(All the operations without decimals)
remainder_of_division = 7 - (7 / 3) * 3
remainder_of_division = 7 % 3
not much better... 😁😁
+ 7
@Full Gamer It is slightly different for negative numbers...
-37%3 would be 2 in Python and -1 in all other languages (that I know)
37%-3 would be -2 in Python and 1 in all other languages (again, that I know)
-37%-3 (should be) 1 in every language. (... that I know.)
Hope this helped! 😉
+ 5
In terms of math, the % sign is the modulus operator.
37 MOD 3 = 1
53 MOD 6 = 5
-75 MOD -4 = -3
Hope you understand it now. 😉
+ 2
thank you all
+ 1
what's meant by " remainder in division"?
+ 1
if you explain it mathematically i would be thankful.😊
+ 1
In mathematical signs , % = to what?!