nerdexam
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

Sign in or unlock GPYC to reveal the answer and full explanation for question #7. The question stem and answer options stay visible for context.

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>

Unlock GPYC to see the answer

You've previewed enough free GPYC questions. Unlock GPYC for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#function reference#function objects#first-class functions#print
Full GPYC Practice