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