Implementing Interfaces in Python: ABCs and Protocols Quiz
Interactive Quiz ⋅ 10 Questions
By Joseph Peart
In this quiz, you’ll test your understanding of Implementing Interfaces in Python: ABCs and Protocols.
By working through this quiz, you’ll revisit how to model interfaces with abstract base classes and protocols, how to enforce method contracts, and how duck typing lets unrelated classes work together.
Interfaces help you write code that depends on what objects do rather than what they are. Sharpening these skills will make your object-oriented Python more flexible.
The quiz contains 10 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Course
Python Interfaces: Object-Oriented Design Principles
In this video course, you'll explore how to use a Python interface. You'll come to understand why interfaces are so useful and learn how to implement formal and informal interfaces in Python. You'll also examine the differences between Python interfaces and those in other programming languages.
Tutorial
Implementing Interfaces in Python: ABCs and Protocols
Learn how to implement interfaces in Python using abstract base classes, Protocols, and duck typing, and enforce method contracts cleanly.