← Quiz: Inheritance, ABC and MRO: all 10 questions
Quiz: Inheritance, ABC and MRO · Question 8 of 10
What is a mixin?
What is a mixin?
- A.A class with no methods
- B.A small class that adds one feature to other classes through multiple inheritance
- C.Another name for an abstract class
- D.A class that cannot be inherited
Answer & explanation
Correct answer: A small class that adds one feature to other classes through multiple inheritance
JsonMixin adds to_json() to Student and Course without being used alone.
Can you get the rest right without peeking?
Take the timed Quiz: Inheritance, ABC and MRO quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →