nerdexam
Python_Institute

PCPP-32-101 · Question #51

PCPP-32-101 Question #51: Real Exam Question with Answer & Explanation

The correct answer is A. During an object's initialization or later.. Instance variables are typically created during object initialization (e.g., in __init__) but can also be added or modified later at any point in the object's lifecycle.

Question

When are instance variables created? (Choose the best answer.)

Options

  • ADuring an object's initialization or later.
  • BDuring an object's initialization only.
  • CAt any moment of the instance's life.
  • DUpon the first read access to the instance variable.

Explanation

Instance variables are typically created during object initialization (e.g., in init) but can also be added or modified later at any point in the object's lifecycle.

Community Discussion

No community discussion yet for this question.

Full PCPP-32-101 Practice