Post

@Python_Dv Answer: B) 3
int(string, base) converts from that base:
› int('11', 2) reads '11' as binary
› Binary '11' = decimal 3
How:
1 * 2 ^ 1 + 1 * 2 ^ 0 = 2+1 = 3
For beginners — second parameter is the base:
› int('11',10)=11
› int('11',2)=3
› int('A',16)=10
English

@Python_Dv output: B) 3
The second arg is the base.
int('11', 2) = binary 11 = decimal 3.
English

@Python_Dv Answer: B) 3
Explanation, short and clear:
int('11', 2) reads '11' as a binary number.
Binary 11 equals 3 in decimal.
English

@Python_Dv B) 3
int('11', 2) converts the binary number 11 to decimal
English

@Python_Dv Binary Ah.
The Answer is 3.
You are reversing the binary '11' to a normal number.
Eg convert 3 to binary, using 8421(1st four binary digits)
To get 3 from 8421, 2+1=3 (11)
Can 3 be gotten from 8,4? No,(00)
In binary it will be (0011), which is 2,1, add it you get 3.
English

@Python_Dv this was new,
the second argument is for base:
hence base 2, makes it binary.
and "11" in binary is 3 in integar.
banger!
English
















