GIAC
GPYC · Question #34
What is the output of the following line of code typed into a Python interactive session? >>> print (int ("1111", 2))
The correct answer is D. 15. You've hit your limit · resets 1pm (America/New_York)
Python Fundamentals & Command Line Tools
Question
What is the output of the following line of code typed into a Python interactive session?
print (int ("1111", 2))
Options
- A1111
- B16
- C"1111"
- D15
How the community answered
(33 responses)- A3% (1)
- B3% (1)
- D94% (31)
Explanation
You've hit your limit · resets 1pm (America/New_York)
Topics
#int() function#binary conversion#number bases#string to int
Community Discussion
No community discussion yet for this question.