GIAC
GPYC · Question #7
When the following program "question.py" is executed with Python what is the output? $ cat question.py def i(i): i=i+1 return i print(i) $ python question.py
The correct answer is B. 5. You've hit your limit · resets 1pm (America/New_York)
Python Fundamentals & Command Line Tools
Question
When the following program "question.py" is executed with Python what is the output?
$ cat question.py
def i(i):
i=i+1
return i
print(i)
$ python question.py
Options
- A10
- B5
- CFunctionOverride: function i assigned not called
- DFunction I at 0xb7489764>
How the community answered
(36 responses)- A6% (2)
- B92% (33)
- D3% (1)
Explanation
You've hit your limit · resets 1pm (America/New_York)
Topics
#function reference#function objects#first-class functions#print
Community Discussion
No community discussion yet for this question.