| 21. |
When defining a subclass in Python that is meant to serve as a subtype, the subtype Python keyword is used.
|
||||
|
Answer:
Option (b) |
| 22. |
Suppose B is a subclass of A, to invoke the __init__ method in A from B, what is the line of code you should write?
|
||||||||
|
Answer:
Option (a) |
| 23. |
What does built-in function type do in context of classes?
|
||||||||
|
Answer:
Option (b) |
| 24. |
Which of the following is not a type of inheritance?
|
||||||||
|
Answer:
Option (a) |
| 25. |
What does built-in function help do in context of classes?
|
||||||||
|
Answer:
Option (c) |
| 26. |
What type of inheritance is illustrated in the following Python code?
class A():
pass
class B(A):
pass
class C(B):
pass
|
||||||||
|
Answer:
Option (a) |
| 27. |
What does single-level inheritance mean?
|
||||||||
|
Answer:
Option (c) |
| 28. |
Which of the following statements isn’t true?
|
||||||||
|
Answer:
Option (c) |
| 29. |
Which of the following statements is true?
|
||||||||
|
Answer:
Option (c) |
| 30. |
Method issubclass() checks if a class is a subclass of another class.
|
||||
|
Answer:
Option (a) |