Modulo operator based question. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Modulo operator based question.

>>>print(6%20) 6 ______________________________________________________________ ā˜Above the expression output is 6. How anyone explain meā˜ ______________________________________________________________ >>>print(6//20) 3 ______________________________________________________________ ā˜These i understood that 6 goes 20 three times.....ā˜ āš  EXPLAIN IN EASY WAY,PLEASE.....THANK YOU

9th Jul 2020, 2:22 PM
Krishna
Krishna - avatar
4 Respostas
+ 7
Krishna % symbol gives you reminder.So if you divide 20 by 6 answer is 6//
9th Jul 2020, 2:27 PM
Simba
Simba - avatar
0
Simba reminder 6 by 20 is 2
9th Jul 2020, 2:32 PM
Krishna
Krishna - avatar
0
Do it pratically
9th Jul 2020, 2:32 PM
Krishna
Krishna - avatar
0
šŠš¢š¢š›šØ š†š”ššš²ššš„ In these chapter show that In the example above, 20 % 6 will return 2, because 3*6+2 is equal to 20...........but execute these code in compiler itsd give6 why?
9th Jul 2020, 2:37 PM
Krishna
Krishna - avatar