O Level Module M3-R5 Solved Paper

O Level Module M3-R5 Solved Paper

181.What will be the output of the following Python statement?
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
>>>chr(ord(‘A’))
A) A ✔️
B) B
C) a
D) Error

182.What will be the output of the following Python statement?
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
>>>print(chr(ord(‘b’)+1))
A) a
B) b
C) c ✔️
D) A

183.Which of the following statement prints hello\example\test.txt?
निम्नलिखित में से कौन सा कथन हैलो \ example \ test.txt प्रिंट करता है?
A) print(“hello\example\test.txt”)
B) print(“hello\\example\\test.txt”) ✔️
C) print(“hello\”example\”test.txt”)
D) print(“hello”\example”\test.txt”)

184.The format function, when applied on a string returns ____
एक स्ट्रिंग पर लागू होने पर प्रारूप फ़ंक्शन, ____
A) Error
B) int
C) bool
D) str ✔️

185.What will be the output of the “hello” +1+2+3?
“हैलो” + 1 + 2 + 3 का आउटपुट क्या होगा?
A) hello123
B) hello
C) Error ✔️
D) hello6

186.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>print(“D”, end = ‘ ‘)
>>>print(“C”, end = ‘ ‘)
>>>print(“B”, end = ‘ ‘)
>>>print(“A”, end = ‘ ‘)
A) DCBA
B) A, B, C, D
C) D C B A ✔️
D) D, C, B, A will be displayed on four lines

187.What will be the output of the following Python statement?(python 3.xx)
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा? (अजगर 3.xx)
>>>print(format(“Welcome”, “10s”), end = ‘#’)
>>>print(format(111, “4d”), end = ‘#’)
>>>print(format(924.656, “3.2f”))
A) Welcome# 111#924.66
B) Welcome#111#924.66
C) Welcome#111#.66
D) Welcome # 111#924.66 ✔️

188.What will be displayed by print(ord(‘b’) – ord(‘a’))?
प्रिंट (ord (‘b’) – ord (‘a’)) द्वारा क्या प्रदर्शित किया जाएगा?
A) 0
B) 1 ✔️
C) -1
D) 2

189.Say s=”hello” what will be the return value of type(s)?
S = “hello” टाइप (s) का रिटर्न मान क्या होगा?
A) int
B) bool
C) str ✔️
D) String

190.What is “Hello”.replace(“l”, “e”?
“हैलो” .replace (“l”, “e” क्या है?
A) Heeeo ✔️
B) Heelo
C) Heleo
D) None

191.To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?
स्ट्रिंग 3 से इंडेक्स 3 पर वर्ण को पुनः प्राप्त करने के लिए = “हैलो” हम किस कमांड को निष्पादित करते हैं (कई उत्तरों की अनुमति है)?
A) s[]
B) s.getitem(3)
C) s.__getitem__(3) ✔️
D) s.getItem(3)

192.To return the length of string s what command do we execute?
स्ट्रिंग की लंबाई वापस करने के लिए हम किस कमांड को निष्पादित करते हैं?
A) s.__len__() ✔️
B) len(s)
C) size(s)
D) s.size()

193.If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.
यदि कोई वर्ग __str __ (स्व) विधि को परिभाषित करता है, तो कक्षा के लिए ऑब्जेक्ट के लिए, आप __str__ विधि को लागू करने के लिए किस कमांड का उपयोग कर सकते हैं।
A) obj.__str__()
B) str(obj)
C) print obj
D) all of the mentioned ✔️

194.To check whether string s1 contains another string s2, use____
यह जाँचने के लिए कि क्या स्ट्रिंग s1 में एक और स्ट्रिंग s2 है, का उपयोग करें
A) s1.__contains__(s2) ✔️
B) s2 in s1
C) s1.contains(s2)
D) si.in(s2)

195.Suppose i is 5 and j is 4, i + j is same as___
मान लीजिये कि i में 5 है और j में 4 है, i + j समान है ___
A) i.__add(j)
B) i.__add__(j) ✔️
C) i.__Add(j)
D) i.__ADD(j)


196.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>print (r”\nhello”)
A) a new line and hello
B) \nhello ✔️
C) the letter r and then hello
D) error

197.What will be the output of the following Python statement?
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
>>>print(‘new’ ‘line’)
A) Error
B) Output equivalent to print ‘new\nline’
C) newline ✔️
D) new line

198.What will be the output of the following Python statement?
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
>>> print(‘x\97\x98’)
A) Error
B) 97
98
C) x\97 ✔️
D) \x97\x98

199.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>str1=”helloworld”
>>>str1[::-1]
A) dlrowolleh ✔️
B) hello
C) world
D) helloworld

200.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
print(0xA + 0xB + 0xC)
A) 0xA0xB0xC
B) Error
C) 0x22
D) 33 ✔️

201.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 ✔️

202.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

203.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>example = “snow world”
>>>print(“%s” % example[4:7])
A) wo ✔️
B) world
C) sn
D) rl

204.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>example = “snow world”
>>>example[3] = ‘s’
>>>print example
A) snow
B) snow world
C) Error ✔️
D) snos world

205.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>max(“what are you”)
A) error
B) u
C) t
D) y ✔️

206.Given a string example=”hello” what is the output of example.count(‘l’)?
एक स्ट्रिंग उदाहरण को देखते हुए = “हैलो” क्या है। उदाहरण के आउटपुट (‘एल’) क्या है?
A) 2 ✔️
B) 1
C) None
D) 0

207.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>example = “helle”
>>>example.find(“e”)
A) Error
B) -1
C) 1 ✔️
D) 0

208.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>example = “helle”
>>>example.rfind(“e”)
A) -1
B) 4 ✔️
C) 3
D) 1

209.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>>example=”helloworld”
>>>example[::-1].startswith(“d”)
A) dlrowolleh
B) True ✔️
C) -1
D) None

210.To concatenate two strings to a third what statements are applicable?
एक बयान में लागू होने के लिए दो तार को एक तिहाई तक पहुंचाने के लिए?
A) s3 = s1 . s2
B) s3 = s1.add(s2)
C) s3 = s1.__add__(s2) ✔️
D) s3 = s1 * s2

Relate Link