Home / Engineering / Problem Solving and Python Programming / Question

M

Mr. Dubey • 51.17K Points
Coach

Q.) Which of the following expressions results in an error?

(A) int(1011)
(B) int(‘1011’,23)
(C) int(1011,2)
(D) int(‘1011’)
Correct answer : Option (C) - int(1011,2)

Explanation:
 the expression int(1011,2) results in an error. had we written this expression as int(‘1011’,2), then there would not be an error.

Share

Discusssion

Login to discuss.