+ 1

Find the output.

Why the answer to question : print(int('0011', 2)) Is 3?

9th Oct 2019, 5:26 PM
Neha Gupta
Neha Gupta - avatar
3 Respostas
+ 4
Mirielle ,yes i checked : int() function in Python and Python3 converts a number in given base to decimal. Syntax : int(string, base) Hence, string with 0011 of base 2 (binary) got evaluated as 3 in decimal (int). 🌼
9th Oct 2019, 6:06 PM
Neha Gupta
Neha Gupta - avatar
Quente hoje
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
FRC Coding?
1 Votes
Quiz duel
0 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes