219). What will be the output of the following Python code?
class father:
    def __init__(self, param):
        self.o1 = param
 
class child(father):
    def __init__(self, param):
        self.o2 = param
 
>>>obj = child(22)
>>>print "%d %d" % (obj.o1, obj.o2)

[A]None None
[B]None 22
[C]22 None
[D]Error is generated

Show Answer

220). What will be the output of the following Python code?
class tester:
    def __init__(self, id):
        self.id = str(id)
        id="224"
 
>>>temp = tester(12)
>>>print(temp.id)

[A]224
[B]Error
[C]12
[D]None

Show Answer

227). What will be the output of the following Python code?
>>>example="helloworld"
>>>example[::-1].startswith("d")

[A]dlrowolleh
[B]True
[C]-1
[D]None

Show Answer

228). To concatenate two strings to a third what statements are applicable?
>>>example="helloworld"
>>>example[::-1].startswith("d")

[A]s3 = s1 . s2
[B]s3 = s1.add(s2)
[C]s3 = s1.__add__(s2)
[D]s3 = s1 * s2

Show Answer