Search Header Logo

Python Object-Oriented Programming Quiz

Authored by Sankarsan Sahoo

Engineering

University

Used 3+ times

Python Object-Oriented Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a class represent in Python?

A function

A blueprint for objects

A variable

A module

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an object in Python?

A block of code

An instance of a class

A data type

A loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is called automatically when an object is created?

__start__

__create__

__init__

__object__

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does self refer to in a Python class method?

The class itself.

The current instance of the class.

A global variable.

A static variable.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create an object (instance) of a class named MyClass?

obj = MyClass()

obj = new MyClass

MyClass.create_object()

instance = MyClass.object

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an instance variable in a Python class?

A variable shared among all instances of a class.

A variable defined outside the class.

A variable specific to an instance of a class.

A variable used for method overloading.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following core principle of Object-Oriented Programming (OOP) that involves bundling data and methods that operate on that data into a single unit (class)?

Inheritance

Polymorphism

Encapsulation

Abstraction

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?