0% found this document useful (0 votes)
12 views3 pages

Full OOPs Python Assessment Guide With Questions

The document is an assessment preparation guide focused on Object-Oriented Programming (OOP) concepts using Python. It includes multiple-choice questions (MCQs) and output-based questions to test understanding of OOP principles such as code reusability, encapsulation, inheritance, and class definitions. Key answers provided include the main purpose of OOP, the output of specific code, and the keyword used to define a class.

Uploaded by

Nandana Linson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Full OOPs Python Assessment Guide With Questions

The document is an assessment preparation guide focused on Object-Oriented Programming (OOP) concepts using Python. It includes multiple-choice questions (MCQs) and output-based questions to test understanding of OOP principles such as code reusability, encapsulation, inheritance, and class definitions. Key answers provided include the main purpose of OOP, the output of specific code, and the keyword used to define a class.

Uploaded by

Nandana Linson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

OOPs Concepts with Python - Assessment Preparation

10. MCQs and Output-Based Questions

1. What is the main purpose of OOP?

a) Faster execution

b) Code reusability and modularity

c) Use of arrays

d) Reduced memory usage

Answer: b

2. Which concept of OOP allows code reuse?

a) Encapsulation

b) Polymorphism

c) Inheritance

d) Abstraction

Answer: c
OOPs Concepts with Python - Assessment Preparation

3. What is the output of the following code?

class A:

def greet(self):

print('Hello from A')

class B(A):

pass

b = B()

b.greet()

a) Hello from A

b) Hello from B

c) Error

d) No output

Answer: a

4. Which keyword is used to define a class in Python?

a) class
OOPs Concepts with Python - Assessment Preparation

b) object

c) define

d) def

Answer: a

5. Which method is automatically called when an object is created?

a) __delete__

b) __start__

c) __init__

d) __new__

Answer: c

You might also like