
Python Design Patterns Quiz
Authored by Айша Асылбек
English
1st Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
49 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When is __new__ executed?
Before __init__
After __init__
Instead of __init__
During class destruction
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What best describes a metaclass?
A superclass for all exceptions
A class that creates other classes
A decorated method
An abstract base class
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the Singleton pattern ensure?
Only one instance exists
Multiple interchangeable algorithms
One-to-many notifications
Dynamic behavior addition
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which pattern delegates object creation to subclasses?
Observer
Factory Method
Decorator
Strategy
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the Observer pattern, who receives updates?
The main subject
Registered observers
Factory objects
Decorator classes
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the Decorator pattern do?
Adds responsibilities dynamically
Ensures single instance
Creates object families
Encapsulates algorithms
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which pattern selects algorithms at runtime?
Singleton
Strategy
Observer
Factory
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?