Bird
0
0

Which of these statements about the __init__ method is TRUE?

easy📝 Conceptual Q2 of 15
Python - Constructors and Object Initialization

Which of these statements about the __init__ method is TRUE?

A<code>__init__</code> is used to delete an object.
B<code>__init__</code> returns the new object instance.
C<code>__init__</code> is called automatically when a new object is created.
D<code>__init__</code> can be called only once per program.
Step-by-Step Solution
Solution:
  1. Step 1: Recall __init__ purpose

    __init__ initializes a new object and is called automatically on creation.
  2. Step 2: Check other options

    __init__ does not return the object, can be called multiple times (for each new object), and is not for deletion.
  3. Final Answer:

    __init__ is called automatically when a new object is created. -> Option C
  4. Quick Check:

    __init__ auto-called on new object [OK]
Quick Trick: __init__ runs automatically on object creation [OK]
Common Mistakes:
  • Thinking __init__ returns object
  • Confusing __init__ with destructor
  • Believing __init__ called once per program

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes