BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Python Institute PCAP-31-03 Exam - Topic 5 Question 24 Discussion

Posted by Jose on May 05, 2022 at 05:15 PM

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

Suggested Answer: C, D

Get Premium PCAP-31-03 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
11 comments · newest first
CO
Cory 1 year ago
Wait, are you sure about that None thing? Sounds weird.
TO
Tonette 1 year ago
Yeah, it must have at least one parameter!
BR
Bronwyn 1 year ago
Constructors don’t return values other than None, right?
MA
Maryann 1 year ago
I thought you could have multiple constructors in Python?
JU
Justine 1 year ago
The constructor is definitely named __init__.
BU
Buck 1 year ago
I feel like the constructor must have at least one parameter, but I can't recall if it's mandatory or just common practice.
RA
Rashad 1 year ago
I practiced a question similar to this, and I think the constructor does not need to return a value, so option B seems wrong.
PA
Paris 1 year ago
I'm not sure if there can be more than one constructor in a class. I think I read something about method overloading, but Python handles it differently.
LI
Lizette 1 year ago
I remember that the constructor in Python is usually the __init__ method, so I think option C is definitely true.
MA
Ma 1 year ago
I'm not too familiar with the gTAA framework, to be honest. But based on the question, it seems like the generation layer would be the most relevant since it's about automatically generating test cases and test data. I'll give that a shot and see how it goes.
KR
Kristel 1 year ago
This might be one of those cases where you have to look at the route-map configurations. I'm wary about getting the syntax right though.
0/2000 characters

Save Cancel