Search Header Logo

Object-Oriented Programming Quiz

Authored by HASAN YIGIT

Computers

Professional Development

Used 1+ times

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

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is Object-Oriented Programming (OOP)?

A programming paradigm based on data abstraction and bundling related behavior

A programming language

A type of function in Python

A method for organizing files in a program

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In OOP, what is a class?

A specific instance of an object

A template for creating objects

A method for organizing functions

A built-in Python function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the init method in a class do?

Initializes the class object

Defines class attributes

Invokes other methods

Creates a new instance of the class and sets its initial state

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is a method different from a function in Python?

Methods are defined outside of classes, while functions are defined inside classes

Functions are used for data abstraction, while methods are used for behavior abstraction

Functions are invoked using dot notation, while methods are invoked using parentheses

Methods are functions that are bound to objects

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are class attributes different from instance attributes?

Class attributes are specific to instances, while instance attributes are shared among all instances.

Class attributes are shared among all instances, while instance attributes are specific to instances.

Class attributes are defined inside methods, while instance attributes are defined outside methods.

Class attributes are used for data abstraction, while instance attributes are used for behavior abstraction.

6.

OPEN ENDED QUESTION

1 min • 3 pts

What does the "self" parameter represent in a method definition?

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

2 mins • 3 pts

Media Image

What is the purpose of the interest attribute in the provided example?

Evaluate responses using AI:

OFF

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?