1.
What is the output of the following Python code:

class Parent(object):
    def __init__(self, name):
    self.name1 = name

class Child(Parent):
    def get_name(self, name):
    self.name2 = "Name"

child = Child("Earth")
print("%s %s" % (child.name1, child.get_name("Mars")))
2.
What is the output of the following Python code:

class Parent(object):
    def __init__(self, name):
    self.name1 = name

class Child(Parent):
    def get_name(self, name):
    self.name2 = name
return self.name2
child = Child("Earth")
print("%s %s" % (child.name1, child.get_name("Mars")))
3.
What is the output of the following Python code:
def foo():
    try:
    return 1
except:
    return 2
z = foo()
print(z)
4.
In OOP, what type of a class only allows one instance of it to be created?
5.
In OOP, which of the following cannot be a friend?
6.
In OOP, which of these is true for a const member function?
7.
In OOP, what is dynamic dispatch?
8.
In OOP, which of the following defines parametric polymorphism?
9.
In OOP, which of these attributes shows only the information that a client requires?
10.
In OOP, which of these statements is true?