0
Please help
I dint understand the quotient remainder chapter.Please explain in easy words.
5 ответов
+ 7
let's say you have 11$ and you want to by as many 3$ chocolates as you can (store owner refuses to cut chocolates stating it is not hygienic). so you want to know how many chocolates you can buy. for that you can use // operator - 11//3 gives 3. also, you might want to know how much money you have left after that. for that you can use % operator - 11%3 gives 2.
more generally, if you have some variables a and b:
a//b will tell you how many times b can fit into a
a%b will tell you what remains after that fitting, which is actually a-(a//b)
0
Please
0
Thanks @redant
0
How 11%3 is 2 PLEASE TELL
0
in 11%3 we must divide 11 with 3 and the remainder is 2