Q1.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = ['25', 'Today', '53', 'Sunday', '15']
x.sort()
print(x)
A.
['Today', 'Sunday', '15', '25', '53']
B.
['Sunday', 'Today', '15', '25', '53']
C.
['15', '25', '53', 'Sunday', 'Today']
D.
['15', '25', '53', 'Today', 'Sunday']
View Answer
Correct Answer: ['15', '25', '53', 'Sunday', 'Today']
Q2.
निम्नलिखित का आउटपुट क्या होगा ?
What is the output of the following?d = {0: 'a', 1: 'b', 2: 'c'}
for i in d:
print(i)
A.
0 1 2
B.
a b c
C.
0 a 1 b 2 c
D.
none of the mentioned
View Answer
Correct Answer: 0 1 2
Q3.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [25, 'Today', 53, 'Sunday', 15]
x.reverse()
print(x)
A.
['Today', 'Sunday', 15, 25, 53]
B.
[15, 'Sunday', 53, 'Today', 25]
C.
[15, 25, 53, 'Sunday', 'Today']
D.
[15, 25, 53, 'Today', 'Sunday']
View Answer
Correct Answer: [15, 'Sunday', 53, 'Today', 25]
Q4.
निम्न्लिखित्ब में कौन सी कमांड लिस्ट बनाता है
Which of the following commands will create a list?
A.
list1 = list()
B.
list1 = []
C.
list1 = list([1, 2, 3])
D.
all of the
View Answer
Correct Answer: all of the
Q5.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = {'Listen' :'Music', 'Play' : 'Games'}
n = list(m.items())
print(n)
A.
[('Listen', 'Music'), ('Play', 'Games')]
B.
[('Listen', 'Music')]
C.
[('Play', 'Games')]
D.
('Play', 'Games'), ('Listen', 'Music')
View Answer
Correct Answer: [('Listen', 'Music'), ('Play', 'Games')]
Q6.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [5, 4, 3, 2, 1]
x.reverse()
print(x)
A.
[0, 1, 2, 3, 4, 5]
B.
[0, 5, 4, 3, 2, 1]
C.
[5, 4, 3, 2, 1, 0]
D.
[1, 2, 3, 4, 5]
View Answer
Correct Answer: [1, 2, 3, 4, 5]
Q7.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = ['July', 'September', 'December']
n = m[1]
print(n)
A.
['July', 'September', 'December']
B.
July
C.
September
D.
December
View Answer
Correct Answer: September
Q8.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = {'m', 'n', 'o', 'p'}
if 'n' in m:
print('n', end=' ')
A.
n
B.
mnop
C.
m n o p
D.
{‘m’, ‘n’, ‘o’, ‘p’}
View Answer
Correct Answer: n
Q9.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = [25, 34, 70, 63]
n = str(m[1]) + str(m[2])
print(n)
A.
2534
B.
95
C.
104
D.
3470
View Answer
Correct Answer: 2534
Q10.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?points = [[1, 2], [3, 1.5], [0.5, 0.5]]
points.sort()
print(points)
A.
[[1, 2], [3, 1.5], [0.5, 0.5]]
B.
[[3, 1.5], [1, 2], [0.5, 0.5]]
C.
[[0.5, 0.5], [1, 2], [3, 1.5]]
D.
[[0.5, 0.5], [3, 1.5], [1, 2]]
View Answer
Correct Answer: [[0.5, 0.5], [1, 2], [3, 1.5]]
Q11.
निम्नलिखित पीस ऑफ़ कोड का आउटपुट क्या होगा ?
What is the output of the following piece of code?a=list((45,)*4)
print(a)
A.
[(45),(45),(45),(45)]
B.
(45,45,45,45)
C.
[45,45,45,45]
D.
Syntax error
View Answer
Correct Answer: [45,45,45,45]
Q12.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?list1 = [1, 2, 3, 4]
list2 = [5, 6, 7, 8]
print(len(list1 + list2))
View Answer
Correct Answer: 8
Q13.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?a=[14,52,7]
b=a.copy()
b is a
A.
True
B.
False
C.
Can’t say
D.
None of these
View Answer
Correct Answer: False
Q14.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [5, 4, 3, 2, 1]
x.extend(x)
print(x)
A.
[5, 4, 3, 2, 1]
B.
[]
C.
[1, 2, 3, 4, 5]
D.
[5, 4, 3, 2, 1, 5, 4, 3, 2, 1]
View Answer
Correct Answer: [5, 4, 3, 2, 1, 5, 4, 3, 2, 1]
Q15.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = {'Listen' :'Music', 'Play' : 'Games'}
n = m['Play']
print(n)
A.
Listen
B.
Music
C.
Play
D.
Games
View Answer
Correct Answer: Games
Q16.
list1 के तीसरे पोजीशन पर 5 इन्सर्ट करने के लिए कौन से कमांड का प्रयोग करेंगे
To insert 5 to the third position in list1, we use which command?
A.
list1.insert(3, 5)
B.
list1.insert(2, 5)
C.
list1.add(3, 5)
D.
list1.append(3, 5)
View Answer
Correct Answer: list1.insert(2, 5)
Q17.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [5, 3, 6, 2, 4, 0, 1]
del x[2:3]
print(x)
A.
[5, 3, 6, 4, 0, 1]
B.
[5, 3, 2, 4, 0, 1]
C.
[5, 6, 2, 4, 0, 1]
D.
[5, 4, 0, 1]
View Answer
Correct Answer: [5, 3, 2, 4, 0, 1]
Q18.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?num = [1, 2, 3, 4]
num.append([5,6,7,8])
print(len(num))
View Answer
Correct Answer: 5
Q19.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = [n*4 for n in range(3)]
print(m)
A.
[0, 0, 0]
B.
[0, 4, 8]
C.
[0, 4, 8, 12]
D.
[0, 4, 8, 12, 16]
View Answer
Correct Answer: [0, 4, 8]
Q20.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [24, 50, 37]
y = 24 in x
print(y)
A.
x[0]
B.
[24]
C.
True
D.
False
View Answer
Correct Answer: True
Q21.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = [-5, -2, 0, 3, 4]
print([n*2 for n in m])
A.
[-10, -4, 0, 6, 8]
B.
[10, 4, 0, 6, 8]
C.
[-10, -4, 0, 6]
D.
[-10, -4, 0]
View Answer
Correct Answer: [-10, -4, 0, 6, 8]
Q22.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?a={1:5,2:3,3:4}
a.pop(3)
print(a)
A.
{1: 5}
B.
{1: 5, 2: 3}
C.
Error
D.
pop() function not exist in dict
View Answer
Correct Answer: {1: 5, 2: 3}
Q23.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = list(range(7,10))
print(m)
A.
[7, 8, 9, 10]
B.
list([7, 8, 9])
C.
[7, 8, 9]
D.
789
View Answer
Correct Answer: [7, 8, 9]
Q24.
निम्नलिखित पाइथन कोड स्निपेट का आउटपुट क्या होगा ?
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
View Answer
Correct Answer: 3 3 3 3
Q25.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [5, 4, 3, 2]
x.insert(1, 0)
print(x)
A.
[5, 1, 3, 2, 0]
B.
[5, 0, 4, 3, 2]
C.
[0, 5, 4, 3, 2]
D.
[1, 5, 4, 3, 2]
View Answer
Correct Answer: [5, 0, 4, 3, 2]
Q26.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?names = ['Amir', 'Bear', 'Charlton', 'Daman']
print(names[-1][-1])
A.
A
B.
Daman
C.
Error
D.
n
View Answer
Correct Answer: n
Q27.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = []
for n in range(6):
m.append(n*3)
print(m)
A.
[3, 6, 9, 12, 15]
B.
[0, 3, 6, 9, 12]
C.
[0, 3, 6, 9, 12, 15]
D.
[]
View Answer
Correct Answer: Correct answer will be printed line-by-line, final output: [0, 3, 6, 9, 12, 15]
Q28.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [[0.0, 1.0, 2.0],[4.0, 5.0, 6.0]]
y = x[0][1] + x[1][0]
print(y)
A.
1.0
B.
4.0
C.
5.0
D.
6.0
View Answer
Correct Answer: 5.0
Q29.
निम्नलिखित पाइथन कोड स्निपेट का आउटपुट क्या होगा ?
What will be the output of the following Python code snippet?a={1:"A",2:"B",3:"C"}
del a
A.
method del doesn’t exist for the dictionary
B.
del deletes the values in the dictionary
C.
del deletes the entire dictionary
D.
del deletes the keys in the dictionary
View Answer
Correct Answer: del deletes the entire dictionary
Q30.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [5, 4, 3, 2]
x.append(1)
print(x)
A.
[5, 4, 3, 2]
B.
5, 4, 3, 2, 1
C.
5432
D.
[5, 4, 3, 2, 1]
View Answer
Correct Answer: [5, 4, 3, 2, 1]
Q31.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = {'Listen' :'Music', 'Play' : 'Games'}
print(m.values())
A.
dict_keys(['Listen', 'Play'])
B.
dict_values(['Music', 'Games'])
C.
dict_values({'Listen' :'Music', 'Play' : 'Games'})
D.
dict_values({'Listen' : 'Games'})
View Answer
Correct Answer: dict_values(['Music', 'Games'])
Q32.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output after the following statements?m = ['Play']
n = ['Games', 'in', 'Python']
o = m + n
print(o)
A.
['Games', 'in', 'Python', 'Play']
B.
['Play Games', 'in', 'Python']
C.
['Play', 'Games', 'in', 'Python']
D.
['PlayGames', 'in', 'Python']
View Answer
Correct Answer: ['Play', 'Games', 'in', 'Python']
Q33.
निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
What will be the output of the following statements?x = [[0.0, 1.0, 2.0],[4.0, 5.0, 6.0]]
y = x[1][2]
print(y)
A.
0.0
B.
1.0
C.
5.0
D.
6.0
View Answer
Correct Answer: 6.0
Q34.
इसका आउटपुट क्या होगा ?
What will be the output?t = (1, 2)
2 * t
A.
(1, 2, 1, 2)
B.
[1, 2, 1, 2]
C.
(1, 1, 2, 2)
D.
[1, 1, 2, 2]
View Answer
Correct Answer: (1, 2, 1, 2)
Q35.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा ?
What will be the output of the following Python code?t1 = (1, 2, 3, 4)
t1.append( (5, 6, 7) )
print(len(t1))
View Answer
Correct Answer: Error