exam questions

Exam PCAP-31-03 All Questions

View all questions & answers for the PCAP-31-03 exam

Exam PCAP-31-03 topic 1 question 30 discussion

Actual exam question from Python Institute's PCAP-31-03
Question #: 30
Topic #: 1
[All PCAP-31-03 Questions]

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

  • A. the constructor’s first parameter identifies an object currently being created
  • B. super-class constructor is invoked implicitly during constructor execution
  • C. the constructor can be invoked directly under strictly defined circumstances
  • D. the constructor cannot use the default values of the parameters
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
jaycosmo_23
3 months ago
Selected Answer: AC
A. The constructor’s first parameter identifies an object currently being created C. The constructor can be invoked directly under strictly defined circumstances
upvoted 3 times
Horsefeathers
3 weeks, 3 days ago
Correct. Explanation for incorrect options: ❌ B. Super-class constructor is invoked implicitly during constructor execution. This is false because the superclass constructor is not invoked automatically. If a class inherits from another class and its constructor needs to be called, it must be explicitly invoked using super().__init__(). ❌ D. The constructor cannot use the default values of the parameters. This is false because Python allows default values in the constructor
upvoted 1 times
...
...
Dave304409
8 months, 1 week ago
Selected Answer: AB
is correct
upvoted 2 times
...
DKAT2023
8 months, 2 weeks ago
A and B are corrects
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago