1.
What is the output of the following Python code:
class Foo(object):
    def __init__(self, data):
    self.__x = data * 2

temp = Foo(25)
print temp.__x
2.
What is the output of the following Python code:
x = 'python'
for i in x:
    x.replace(i, 'x')
print x
3.
What is the output of the following Python code:
print('%d + %d' % (10, 20))
4.
What is the output of the following Python code:
def f(values):
    Values[0] = 44
v = [1, 2, 3]
f(v)
print(v)
5.
What will be the output of the following code:
n = [1, 2, 5, 10, 3, 100, 9, 24]
for e in n:
    if e < 5:
    n.remove(e)
print(n)
6.
What is the output of the following Python code:
class Parent(object):
    def __init__(self, param):
    self.v1 = param

class Child(Parent):
    def __init__(self, param):
    self.v2 = param

obj = Child(11)
print("%d %d" % (obj.v1, obj.v2))
None 11
7.
What is the output of the following Python code:
class Account(object):
    def __init__(self, id, balance):
    self.id = id
self.balance = balance

def deposit(self, amount):
    self.balance += amount

def withdraw(self, amount):
    self.balance -= amount

account = Account('123', 100)
account.deposit(800)
account.withdraw(500)

fname = "%s" % account.id
fd = open(fname, "wb")
fd.write(str(account.balance))
fd.close()

account.deposit(200)
fd = open(fname, "rb")
print(fd.readlines()[0])
fd.close()
fd = open(fname, "wb")
fd.write(str(account.balance))
fd.close()
print(account.balance)
8.
What is the output of the python code below:
d = {
    'a': 1,
    'b': 2,
    'c': 3,
}
print d.keys()
9.
What would be the output of the following code
import threading, time

def wait():
    time.sleep(3)
print('Waiting...')

def func():
    print('Starting')
t = threading.Thread(target = wait)
t.run()
print('Finishing')
10.
What is the output of the following Python code:
a = {
    (1, 2): 1, (2, 3): 2
}
print(a[1, 2])