
oop midterm
Authored by Zhaniye Kassym
English
5th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you instantiate an object in Python?
How do you instantiate an object in Python?
obj = create Object()
obj = Object()
obj = Object
obj = new Object()
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Identify whether the following statements about abstract base classes are True or False:(choose only true)
The metaclass keyword is used to define abstract base classes.
A class must implement all methods of an abstract base class.
Abstract base classes define a set of methods and properties.
ABCs in Python are primarily created using the abc module.
Abstract base classes always require subclassing to be useful.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default superclass for all Python classes?
base
super
object
main
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Match the exceptions with their corresponding descriptions: index error
Raised when an index is out of range for a sequence (e.g., list, tuple).
Raised for an operation or function that is applied to an inappropriate object type.
Raised when a function receives an argument of the correct type but an inappropriate value.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Match the exceptions with their corresponding descriptions: type error
Raised when a function receives an argument of the correct type but an inappropriate value.
Raised for an operation or function that is applied to an inappropriate object type.
Raised when an index is out of range for a sequence (e.g., list, tuple).
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Match the exceptions with their corresponding descriptions: value error
Raised when an index is out of range for a sequence (e.g., list, tuple).
Raised for an operation or function that is applied to an inappropriate object type.
Raised when a function receives an argument of the correct type but an inappropriate value.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What term is often used synonymously with "information hiding" in the context of object-oriented design?
encapsulation
abstraction
inheritance
polymorphism
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?