B is the correct answer
Traceback (most recent call last):
File "main.py", line 17, in <module>
print(a.doit() + b.doit())
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
#question 120
class Super:
def make(self):
pass
def doit(self):
return self.make()
class Sub_A(Super):
def make(self):
return 1
class Sub_B(Super):
pass
a=Sub_A()
b=Sub_B()
print(a.doit())
print(b.doit())
print(a.doit() + b.doit())#TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
Tested: B. it raises an exception
This section is not available anymore. Please use the main Exam Page.PCAP Exam Questions
Log in to ExamTopics
Sign in:
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.
deckman
Highly Voted 3 years, 1 month agoseaverick
Most Recent 1 year, 5 months agoSiva_2022
3 years, 1 month agomacxsz
3 years, 2 months ago