Python MCQs with Explanation

Which of the following statements is correct regarding the object-oriented programming concept in Python?

  1. Classes are real-world entities while objects are not real
  2. Objects are real-world entities while classes are not real
  3. Both objects and classes are real-world entities
  4. All of these 



Answer: 
Option b: Objects are real-world entities while classes are not real.

In object-oriented programming, classes are used as blueprints or templates to define the structure and behavior of objects. A class describes the common characteristics and behaviors that a group of objects of the same type will have.

On the other hand, objects are instances of classes and represent specific, tangible entities in the real world. Each object has its own unique state and behavior based on the class it belongs to. Objects can interact with each other, modify their state, and perform actions according to the behavior defined by the class.

So, while classes are abstract representations and do not exist as tangible entities, objects are the actual instances that exist and interact in the real world.

Post a Comment

0 Comments