+ 1

Find output(python) - print(int('0011',2))

How does it gives 3

14th Jun 2020, 7:22 AM
Abhijit
Abhijit - avatar
2 Antworten
+ 4
Because you have entered 0011 in base 2 and int will convert it to base 10 So by simple conversation 0011 equals 3. May it helps you.
14th Jun 2020, 7:41 AM
Hacker Badshah
Hacker Badshah - avatar
+ 1
Thank you
14th Jun 2020, 7:53 AM
Abhijit
Abhijit - avatar