nerdexam
Python_Institute

PCAP-31-03 · Question #116

What is true about Python class constructors? (Choose two.)

The correct answer is C. the constructor is a method named __init__ D. the constructor must have at least one parameter. See the full explanation below for the reasoning.

Question

What is true about Python class constructors? (Choose two.)

Options

  • Athere can be more than one constructor in a Python class
  • Bthe constructor must return a value other than None
  • Cthe constructor is a method named init
  • Dthe constructor must have at least one parameter

How the community answered

(32 responses)
  • A
    16% (5)
  • B
    9% (3)
  • C
    75% (24)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice