VITyarthi Python Essentials Module 12 Quiz Answer

Question 1

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 the above
 

2. Objects are real-world entities while classes are not real

Question 2

What is Instantiation in terms of OOP terminology?

  1. Deleting an instance of class
  2. Modifying an instance of class
  3. Copying an instance of class
  4. Creating an instance of class

4. Creating an instance of class

Question 3

The __init__() function is a _________?

  1. constructor
  2. destructor
  3. method
  1. constructor

Question 4

How to declare a private variable in python, Using *?

  1. private keyword
  2. __ (double underscore)
  3. _ (single underscore)
  4. none of the above

2. __ (double underscore)

Question 5

Which keyword is used to access members of the base class?

  1. self
  2. pass
  3. super
  4. assert

3. super

Question 6

Constructor overload permitted in Python?

  1. True
  2. False

2. False

Question 7

Private members of a class cannot be accessed. *?

  1. True
  2. False

2. False

Question 8

Is that true __init__() function automatically called when an object is created?

  1. True
  2. False
  1. True

Question 9

What is the method inside the class in the python language?

  1. Object
  2. Function
  3. Attribute
  4. Argument

2. Function

Question 10

Which of the following accepts functions definition?

  1. Module
  2. Class
  3. Another function
  4. All of the mentioned

4. All of the mentioned

Question 11

Is this code is valid in python or not * class Python: pass?

  1. Yes
  2. No
  3. May Be
  1. Yes

Question 12

What are the methods which begin and end with two underscore characters called?

  1. Special methods
  2. In-built methods
  3. User-defined methods
  4. Additional methods
  1. Special methods

Question 13

Which of the following best suits for inheritance?

  1. Ability of a class to derive members of another class as a part of its own definition
  2. Means of bundling instance variables and methods in order to restrict access to certain class members
  3. Focuses on variables and passing of variables to functions
  4. Allows for implementation of elegant software that is well designed and easily modified
  1. Ability of a class to derive members of another class as a part of its own definition

Question 14

The class from which the child class inherits is called ________ *?

  1. Child class
  2. Parent class
  3. Super class
  4. Base class
  5. ii) iii) and iv

5. ii) iii) and iv

Question 15

Which of these is not a fundamental feature of OOP?

  1. Encapsulation
  2. Inheritance
  3. Instantiation
  4. Polymorphism

3. Instantiation

Question 16

What is the best suitable answer to function overloading?

  1. Inheritance may or may not be required.
  2. Inheritance always required
  3. Both are correct
  4. Neither of these two
  1. Inheritance may or may not be required.

Question 17

What is the best suitable answer to overriding?

  1. When two or more methods in the same class have the same name but different parameters
  2. When the method signature (name and parameters) are the same in the superclass and the child class
  3. Both are correct
  4. Neither of these two
  1. When two or more methods in the same class have the same name but different parameters

Question 18

What is the best suitable answer to function overloading?

  1. There is no need for more than one class.
  2. There is a need for at least two classes.
  3. Both are correct
  4. Neither of these two
  1. There is no need for more than one class.

Question 19

What is the best suitable answer to function overloading?

  1. When two or more methods in the same class have the same name but different parameters
  2. When the method signature (name and parameters) are the same in the superclass and the child class
  3. Both are correct
  4. Neither of these two

2. When the method signature (name and parameters) are the same in the superclass and the child class

Question 20

The assignment of more than one function to a particular operator is _____?

  1. Operator over-assignment
  2. Operator overriding
  3. Operator overloading
  4. Operator instance

3. Operator overloading

Question 21

Which of the following is/are contents of polymorphism.

  1. method overloading
  2. method overriding
  3. both above
  4. none of the above

3. both above

If you find anything wrong in this Answer Key, feel free to reach us in the comment section.

Sharing Is Caring:

Leave a Comment