+ 3

Why is the output of print (int(2/2*2-2+2%2)) Memory limit exceeded?

print (int(2/2*2-2+2%2))

23rd Mar 2017, 8:10 PM
Kassem Shehady
Kassem Shehady - avatar
6 Answers
+ 7
I run your code, man. It prints 0 each time I execute it.
23rd Mar 2017, 8:26 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 5
It does print 0 alright when I run it.
23rd Mar 2017, 8:20 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 5
2/2*2-2+2%2 = 1*2-2+2%2 = 2-2+2%2 = 0+0 = 0. And, this is what we get on execution.
24th Mar 2017, 1:23 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 3
I run it on sololearn app
23rd Mar 2017, 8:21 PM
Kassem Shehady
Kassem Shehady - avatar
+ 1
0 ...
23rd Mar 2017, 9:41 PM
Mr Sab
0
0
28th Apr 2017, 10:33 AM
mei
mei - avatar