+ 1
Can anyone explain this?
Why the answer is 3 Print(int("0011",2)
5 Answers
+ 3
0011 = 3
binary 0011 is 3 in decimal.
int() is given a second argument 2 to specify the binary base.
+ 1
Thanks for the comments everyone: This question was asked to me in yesterday's challenge
0
šš¢š¢ššØ šš”šš²šš„ of course with a missing parentheses and capital p in "Print" , it will not work. but you get the purpose of the question nevertheless.
0
Bahhaš§
Yeah I know