+ 1

Why this prints 50? Input:print(50%96) Output:50

This Question is in from Python challenge 😔 I lost challenge because of this Question

15th Jul 2020, 3:28 AM
Nikhil Patil
Nikhil Patil - avatar
3 odpowiedzi
+ 2
Here is rule if x is greater than y then always y print (y%x) Output y It is because if we divide y with x it gives some float value & does not gives any reminder so why above rule makes.
15th Jul 2020, 3:37 AM
Sâñtôsh
Sâñtôsh - avatar
+ 6
If you divide 50 by 96, quotient will be 0 and remainder will be 50. So it return 50, simple. Happy coding
15th Jul 2020, 3:46 AM
ツSampriya😘ツ
ツSampriya😘ツ - avatar
+ 2
Thanks in Advance 😉
15th Jul 2020, 3:28 AM
Nikhil Patil
Nikhil Patil - avatar