NIELIT O Level M3-R5 Model Paper 1

NIELIT O Level M3-R5 Model Paper 1

151.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
x = 2
for i in range(x):
x -= 2
print (x)
A) 0 1 2 3 4 …
B) 0 -2 ✔️
C) 0
D) error
152.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(10):
if i == 5:
break
else:
print(i)
else:
print(“Here”)
A) 0 1 2 3 4 Here
B) 0 1 2 3 4 5 Here
C) 0 1 2 3 4 ✔️
D) 1 2 3 4 5

153.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(5):
if i == 5:
break
else:
print(i)
else:
print(“Here”)
A) 0 1 2 3 4 Here ✔️
B) 0 1 2 3 4 5 Here
C) 0 1 2 3 4
D) 1 2 3 4 5

154.Set makes use of___ Dictionary makes use of____
सेट का उपयोग करता है _ शब्दकोश ____ का उपयोग करता है
A) keys, keys
B) key values, keys
C) keys, key values ✔️
D) key values, key values

155.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
x = (i for i in range(3))
for i in x:
print(i)
for i in x:
print(i)
A) 0 1 2 ✔️
B) error
C) 0 1 2 0 1 2
D) None of the mentioned

156.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

string = “my name is x”
for i in string:
print (i, end=”, “)
A) m, y, , n, a, m, e, , i, s, , x, ✔️
B) m, y, , n, a, m, e, , i, s, , x
C) my, name, is, x,
D) error

157.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

string = “my name is x”
for i in string.split():
print (i, end=”, “)
A) m, y, , n, a, m, e, , i, s, , x,
B) m, y, , n, a, m, e, , i, s, , x
C) my, name, is, x, ✔️
D) error

158.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
a = [0, 1, 2, 3]
for a[-1] in a:
print(a[-1])
A) 0 1 2 3
B) 0 1 2 2 ✔️
C) 3 3 3 3
D) error

159.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
a = [0, 1, 2, 3]
for a[0] in a:
print(a[0])
A) 0 1 2 3 ✔️
B) 0 1 2 2
C) 3 3 3 3
D) error

160.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
a = [0, 1, 2, 3]
i = -2
for i not in a:
print(i)
i += 1
A) -2 -1
B) 0
C) error ✔️
D) None of the mentioned

161.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
string = “my name is x”
for i in ‘ ‘.join(string.split()):
print (i, end=”, “)
A) m, y, , n, a, m, e, , i, s, , x, ✔️
B) m, y, , n, a, m, e, , i, s, , x
C) my, name, is, x,
D) error

162.What will be the output of the following Python statement?
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
>>>”a”+”bc”
A) a
B) bc
C) bca
D) abc ✔️

163.What will be the output of the following Python statement?
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
>>>”abcd”[2:]
A) a
B) ab
C) cd ✔️
D) dc

164.The output of executing string.ascii_letters can also be achieved by:
String.ascii_letters निष्पादित करने का आउटपुट भी इससे प्राप्त किया जा सकता है:
A) string.ascii_lowercase_string.digits
B) string.ascii_lowercase+string.ascii_uppercase ✔️
C) string.letters
D) string.lowercase_string.uppercase

165.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
>>> str1 = ‘hello’
>>> str2 = ‘,’
>>> str3 = ‘world’
>>> str1[-1:]
A) olleh
B) hello
C) h
D) o ✔️


166.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
d = {0: ‘a’, 1: ‘b’, 2: ‘c’}
for x in d.values():
print(x)
A) 0 1 2
B) a b c ✔️
C) 0 a 1 b 2 c
D) None of the mentioned

167.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
d = {0: ‘a’, 1: ‘b’, 2: ‘c’}
for x in d.values():
print(d[x])
A) 0 1 2
B) a b c
C) 0 a 1 b 2 c
D) None of the mentioned ✔️

168.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
d = {0, 1, 2}
for x in d.values():
print(x)
A) 0 1 2
B) None None None
C) error ✔️
D) None of the mentioned

169.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
d = {0, 1, 2}
for x in d:
print(x)
A) 0 1 2 ✔️
B) {0, 1, 2} {0, 1, 2} {0, 1, 2}
C) error
D) None of the mentioned

170.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
d = {0, 1, 2}
for x in d:
print(d.add(x))
A) 0 1 2
B) 0 1 2 0 1 2 0 1 2 …
C) None None None ✔️
D) None of the mentioned

171.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(0):
print(i)
A) 0
B) no output ✔️
C) error
D) None of the mentioned

172.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(2.0):
print(i)
A) 0.0 1.0
B) 0 1
C) error ✔️
D) None of the mentioned

173.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(int(2.0)):
print(i)
A) 0.0 1.0
B) 0 1 ✔️
C) error
D) None of the mentioned

174.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(float(‘inf’)):
print (i)
A) 0.0 0.1 0.2 0.3 …
B) 0 1 2 3 …
C) 0.0 1.0 2.0 3.0 …
D) None of the mentioned ✔️

175.What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
for i in range(int(float(‘inf’))):
print (i)
A) 0.0 0.1 0.2 0.3 …
B) 0 1 2 3 …
C) 0.0 1.0 2.0 3.0 …
D) None of the mentioned ✔️

176.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
for i in [1, 2, 3, 4][::-1]:
print (i)
A) 1 2 3 4
B) 4 3 2 1 ✔️
C) error
D) None of the mentioned

177.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
for i in ”.join(reversed(list(‘abcd’))):
print (i)
A) a b c d
B) d c b a ✔️
C) error
D) None of the mentioned

178.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
for i in ‘abcd'[::-1]:
print (i)
A) a b c d
B) d c b a ✔️
C) error
D) None of the mentioned

179.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
for i in ”:
print (i)
A) None
B)(nothing is printed) ✔️
C) error
D) None of the mentioned

180.What will be the output of the following Python code snippet?
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
x = 2
for i in range(x):
x += 1
print (x)
A) 0 1 2 3 4 …
B) 0 1
C) 3 4 ✔️
D) 0 1 2 3

Relate Link