Modulo operator based question. | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
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 Respuestas
+ 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