gs gs109 Python OOPs - Python Encapsulation - Quiz No.1

gs gs109 Python Quiz

Online Quizzes Preparation

This quiz belongs to book/course code gs gs109 Python of gs organization. We have 134 quizzes available related to the book/course Python. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Python OOPs. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.

NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.

Question 1: Which of these is not a fundamental features of OOP?
Question 2: Which of the following is the most suitable definition for encapsulation?
Question 3: What will be the output of the following Python code?

 class Demo: def __init__(self): self.a = 1 self.__b = 1  def display(self): return self.__b obj = Demo() print(obj.a) 
Question 4: What will be the output of the following Python code?

 class Demo: def __init__(self): self.a = 1 self.__b = 1  def display(self): return self.__b  obj = Demo() print(obj.__b) 
Question 5: Methods of a class that provide access to private members of the class are called as ______ and ______
Question 7: What will be the output of the following Python code?

 class Demo: def __init__(self): self.a = 1 self.__b = 1  def get(self): return self.__b  obj = Demo() print(obj.get()) 
Question 8: What will be the output of the following Python code?

 class Demo: def __init__(self): self.a = 1 self.__b = 1 def get(self): return self.__b obj = Demo() obj.a=45 print(obj.a) 


Online Quizzes of gs109 Python

Other LANG related online quizzes

Other categories of gs Online Quizzes

Other organizations

Theme Customizer

Gaussian Texture



Gradient Background