+ 1

Operations

What is the meaning of this ( integ % ANOTHER INTEG) Ex... Print(20%6) 2

9th May 2019, 5:45 AM
ABDELRHMAN RAGAB
ABDELRHMAN RAGAB - avatar
4 Respostas
+ 3
ABDELRHMAN RAGAB The answer isn't 1,because you're using the division operator, not the modulo operator. To make the answer 1,you'd need to write this: 10 % 3
9th May 2019, 7:12 AM
inxanedev!
inxanedev! - avatar
+ 1
This is the modulo operator (% in some languages, or mod in math) giving you whats left of a integer devision. E.g. 17 % 3 = 2 (due 3*5+2 = 17).
9th May 2019, 5:51 AM
Daniel Adam
Daniel Adam - avatar
0
Like 10/3 Answer will be 1?
9th May 2019, 6:06 AM
ABDELRHMAN RAGAB
ABDELRHMAN RAGAB - avatar
0
Thanks for you, I just start to learn python about 5 days ago
13th May 2019, 7:25 AM
ABDELRHMAN RAGAB
ABDELRHMAN RAGAB - avatar