Search Header Logo

Python OOP and Data Types Quiz

Authored by inocencio madriaga

Computers

University

Used 19+ times

Python OOP and Data Types Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best defines Object-Oriented Programming (OOP)?

A programming paradigm focused only on functions

A programming paradigm based on objects that contain data and behavior

A language-specific coding style

A way to run Python faster

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, which symbol is used to indicate a private attribute?

_ (single underscore)

__ (double underscore)

@

$

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which OOP principle is applied when a child class inherits methods and attributes from a parent class?

Abstraction

Polymorphism

Encapsulation

Inheritance

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python data type is immutable?

List

Dictionary

Tuple

Set

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of: print(10 % 3)

0

1

2

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of abstraction in Python?

Using private attributes

Hiding implementation details with abstract classes

Sharing methods across multiple classes

Reusing code with inheritance

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is best suited for iterating over a sequence?

while

do-while

for

switch

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?

Discover more resources for Computers