Which of the following expressions results in an error?

Which of the following expressions results in an error?
A. int(1011)
B. int(‘1011’,23)
C. int(1011,2)
D. int(‘1011’)
 
Answer: c
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.
 

Tìm kiếm

Back
Top