1. From an object oriented programming perspective, a class is the blueprint for an ………………
2. A class simply describes what an object will look like and how it will behave.
3. Therefore instantiation is the process of taking a class definition and ………………………………………..
4. An object is an instance of a class, and may be called a class instance or class object; instantiation is then also known as ………………………
5. Not all classes can be instantiated – ………………………. cannot be instantiated, while classes that can be instantiated are called concrete classes
6. Like constructors in C++, we’ve got the ……………..in Python. This function gets called every time you instantiate the class. Please refer the below example to view a complete Python class.
7. Which Of The Following Represents A Distinctly Identifiable Entity In The Real World?
8. Which Of The Following Keywords Mark The Beginning Of The Class Definition?
9. Which Of The Following Is Required To Create A New Instance Of The Class?
10. Which Of The Following Statements Is Most Accurate For The Declaration X = Circle()?
11. What is the output of the following code snippet?
12. Every object in Python has an attribute denoted by __dict__. This dictionary/dictionary-like object contains all the attributes defined for the object itself. It ……………………
13. What is the output of the following code that makes use of __dict__?
14. Which Of The Following Statements Can Be Used To Check, Whether An Object “Obj” Is An Instance Of Class A Or Not?
15. In the following code, where is the object being created and what is the object?
16. What is the output of the following? Note particularly the last line - obj.fun()
17. If we have a method which takes no arguments, then we still have to have one argument – the self
18. The __init__ method is similar to constructors in C++ and Java. It is run as soon as an ……………………………….. is instantiated.
19. Here, we define the __init__ method as taking one parameter ……………………………..(along with the usual self)
20. What is the output from the following code?
21. In the following code, fill in the blanks for d.kind.
22. It is good practice to define the attributes of an instance right after its creation.
23. __init__ is a method which is immediately and automatically called after an instance has been created
24. There is no explicit constructor or destructor method in Python, as they are known in C++ and Java but…(read the following excerpt) and decide whether it is true or false.
25. Guido van Rossum has designed the language according to the principle "first-class everything". In fact - everything in Python is a class.