TN Online TestSamacheer Kalvi practice

12th Standard Computer Science — Python Classes and objects: Online Practice Test

Share this chapter: Telegram

Pick how many questions you want and set a time limit, then start. You'll get your score at the end with the correct answer and an explanation for every question. Free, in Tamil and English — 25 questions available.

Set up your test

Time remaining00:00
Q1
Which of the following are the key features of an Object Oriented Programming language?
Q2
Functions defined inside a class are called:
Q3
Class members are accessed through which operator?
Q4
Which of the following methods is automatically executed when an object is created?
Q5
A private class variable is prefixed with:
Q6
Which of the following methods is used as a destructor?
Q7
Which of the following class declarations is correct?
Q8
What is the output of the following program? ```python class Student: def __init__(self, name): self.name=name print (self.name) S=Student("Tamil") ```
Q9
Which of the following is a private class variable?
Q10
The process of creating an object is called:
Q11
Which keyword is used to define a class in Python?
Q12
What is the process of creating an object or instance of a class known as?
Q13
Which operator is used to access class variables and methods through an object in Python?
Q14
What must be the first parameter of any method or function defined inside a Python class?
Q15
Which special method acts as a constructor in Python classes?
Q16
Which of the following correctly describes how a private member variable is declared in a Python class?
Q17
If a private variable __n2 is declared in class Sample, what happens when you try to print it directly from outside the class using object S?
Q18
How are instance variables defined within a class method in Python?
Q19
Which special method is used as a destructor in Python to destroy an object?
Q20
What is the default access control type for variables and methods defined inside a Python class?
Q21
Consider a class method check(self, num) that takes one parameter in its definition besides self. How many arguments are passed when it is called?
Q22
According to Python guidelines, how should class variables be accessed when referenced inside a class method?
Q23
What happens if a constructor is defined with parameters, and we instantiate the class without passing any arguments?
Q24
How can a programmer manually delete an object reference and invoke its destructor in Python?
Q25
Which of the following is true regarding class variables and instance variables in Python?

More for this chapter

Book Back Questions10 textbook MCQs · solved Additional MCQs15 extra MCQs · solved Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods Formula SheetAll key formulas

About this Python Classes and objects test

This free online practice test covers Python Classes and objects from the 12th Standard Computer Science (Samacheer Kalvi) syllabus. Choose the number of questions and an optional time limit, then answer and submit — everything is checked in your browser, with the correct answers and a worked explanation shown at the end. For the full solutions to every question in this set, see the solved MCQs page.

More chapters in Computer Science

View all
1 Function 2 Data Abstraction 3 Scoping 4 Algorithmic Strategies 5 Python -Variables and Operators 6 Control Structures 7 Python functions 8 Strings and String manipulation 9 Lists, Tuples, Sets and Dictionary 11 Database Concepts 12 Structured Query Language (SQL) 13 Python and CSV files 14 Importing C++ programs in Python. 15 Data manipulation through SQL 16 Data visualization using pyplot: line chart, pie chart and bar chart