← Quiz: Polymorphism: all 10 questions
Quiz: Polymorphism · Question 5 of 10
Which method lets a + b work for your own Python class?
Which method lets a + b work for your own Python class?
- A.plus
- B.add
- C.sum
- D.concat
Answer & explanation
Correct answer: add
Python calls a.add(b) for a + b.
Can you get the rest right without peeking?
Take the timed Quiz: Polymorphism quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →