Search Header Logo

oop midterm

Authored by Zhaniye Kassym

English

5th Grade

Used 7+ times

oop midterm
AI

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

  1. How do you instantiate an object in Python?

  1. obj = create Object()

  1. obj = Object()

  1. 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)

  1. The metaclass keyword is used to define abstract base classes.

  1. A class must implement all methods of an abstract base class.

  1. Abstract base classes define a set of methods and properties.

  1. ABCs in Python are primarily created using the abc module.

  1. 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

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?