Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : python - SEQUENCE DATA TYPES IN PYTHON
SEQUENCE DATA TYPES IN PYTHON
00:00:00
English
Hindi
Question No# :
01
out of 50
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?
मान लीजिए लिस्ट है [3, 4, 5, 20, 5, 25, 1, 3] ,listExample.extend([34, 5]) के बाद की लिस्ट1 क्या है।
A.
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
B.
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
C.
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
D.
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
Question No# :
02
out of 50
<p>What will be the output of the following Python code?</p><pre>list1 = [1, 3]<br>list2 = list1<br>list1[0] = 4<br>print(list2)</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">list1 = [1, 3]<br>list2 = list1<br>list1[0] = 4<br>print(list2)</pre>
A.
[1, 3]
[1, 3]
B.
[4, 3]
[4, 3]
C.
[1, 4]
[1, 4]
D.
[1, 3, 4]
[1, 3, 4]
Question No# :
03
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in range(len(x)):<br></span><span style="font-size: 14px;"> x[i].upper()<br></span><span style="font-size: 14px;">print (x)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in range(len(x)):<br></span><span style="font-size: 14px;"> x[i].upper()<br></span><span style="font-size: 14px;">print (x)</span></pre>
A.
abcd
abcd
B.
ABCD
ABCD
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
04
out of 50
<p>Which of the following will delete key-value pair for key="tiger" in dictionary?</p><pre><span style="font-size: 12.6px;">dic={"lion":"'wild","tiger":"'wild",'cat":"domestic","dog":"domestic"}</span></pre>
<p>निम्न में से कौन शब्दकोश में Key-Tiger के लिए की-वैल्यू पेयार को डिलीट करेगा|</p><pre style=""><span style="font-size: 12.6px;">dic={"lion":"'wild","tiger":"'wild",'cat":"domestic","dog":"domestic"}</span><span style="font-size: 12.6px; letter-spacing: 0.14px;"></span></pre><p> </p>
A.
del dic("tiger")
del dic("tiger")
B.
dic["tiger"].delete()
dic["tiger"].delete()
C.
delete(dic.["tiger'])
delete(dic.["tiger'])
D.
del dic["tiger"]
del dic["tiger"]
Question No# :
05
out of 50
Set makes use of __________ Dictionary makes use of ____________
सेट __________ का यूज़ करता है शब्दकोश ____________ का यूज़ करता है
A.
keys, keys
keys, keys
B.
key values, keys
key values, keys
C.
keys, key values
keys, key values
D.
key values, key values
key values, key values
Question No# :
06
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">i = "a"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> x = x[:-1]<br></span><span style="font-size: 14px;"> print(i, end = " ")</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">i = "a"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> x = x[:-1]<br></span><span style="font-size: 14px;"> print(i, end = " ")</span></pre>
A.
i i i i i i
i i i i i i
B.
a a a a a a
a a a a a a
C.
a a a a a
a a a a a
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
07
out of 50
Write the list comprehension to pick out only negative integers from a given list ‘l’.
दी गई लिस्ट। L ’से केवल नेगटिव इन्टिजर निकालने के लिए लिस्ट की समझ लिखें।
A.
[x<0 in l]
[x<0 in l]
B.
[x for x<0 in l]
[x for x<0 in l]
C.
[x in l for x<0]
[x in l for x<0]
D.
[x for x in l if x<0]
[x for x in l if x<0]
Question No# :
08
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("xyyzxyzxzxyy".endswith("xyy"))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("xyyzxyzxzxyy".endswith("xyy"))</span></pre>
A.
1
1
B.
True
सही
C.
3
3
D.
2
2
Question No# :
09
out of 50
Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?
मान लीजिए कि d = {"जॉन": 40, "पीटर": 45}, "जॉन" के लिए एंट्री डिलीट करने के लिए,हम किस कमांड का यूज़ करते हैं?
A.
d.delete(“john”:40)
d.delete ( "जॉन": 40)
B.
d.delete(“john”)
d.delete ( "जॉन")
C.
del d[“john”]
डेल डी ["जॉन"]
D.
del d(“john”:40)
डेल डी ("जॉन": 40)
Question No# :
10
out of 50
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
मान लीजिए t = (1, 2, 4, 3), निम्न में से कौन गलत है?
A.
print(t[3])
print(t[3])
B.
t[3] = 45
t[3] = 45
C.
print(max(t))
print(max(t))
D.
print(len(t))
print(len(t))
Question No# :
11
out of 50
<p>What is the output of the following code ?</p><pre>ms = ('A','D', 'H','U','N','I','C')<br>print(ms[1:4])</pre>
<p> निम्नलिखित कोड का आउटपुट क्या है ?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">ms = ('A','D', 'H','U','N','I','C')<br>print(ms[1:4])</pre>
A.
(‘D’, ‘H’, ‘U’)
(‘D’, ‘H’, ‘U’)
B.
(‘A’, ‘D’, ‘H’,’U’,’N’,’I’,’C’)
(‘A’, ‘D’, ‘H’,’U’,’N’,’I’,’C’)
C.
(‘D’,’H’,’U’,’N’,’I’,’C’)
(‘D’,’H’,’U’,’N’,’I’,’C’)
D.
(‘D’,’H’,’U’,’N’,’I’,’C’)
(‘D’,’H’,’U’,’N’,’I’,’C’)
Question No# :
12
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">d1 = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">d2 = {"john":466, "peter":45}<br></span><span style="font-size: 14px;">print(d1 > d2)</span></pre> <p> </p> <p> </p> <p> </p>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">d1 = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">d2 = {"john":466, "peter":45}<br></span><span style="font-size: 14px;">print(d1 > d2)</span></pre>
A.
True
सही
B.
False
गलत
C.
Error
एरर
D.
None
कोई नहीं
Question No# :
13
out of 50
<p>What will be the output of the following Python code?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""> <span style="font-size: 12.6px;">a=[1,2,3] b=a.append(4) print(a) print(b)</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre class="de1" lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"="" style="font-size: 12.6px; letter-spacing: 0.14px; border-radius: 0px; padding: 0px;"> a=[1,2,3] b=a.append(4) print(a) print(b)</pre>
A.
[1,2,3,4] [1,2,3,4]
[1,2,3,4] [1,2,3,4]
B.
[1, 2, 3, 4] None
[1, 2, 3, 4] None
C.
Syntax error
Syntax error
D.
[1,2,3] [1,2,3,4]
[1,2,3] [1,2,3,4]
Question No# :
14
out of 50
<p>What will be the output of the following Python code?</p><pre>def f(values):<br> values[0] = 44<br> <br>v = [1, 2, 3]<br>f(v)<br>print(v)</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">def f(values):<br> values[0] = 44<br> <br>v = [1, 2, 3]<br>f(v)<br>print(v)</pre>
A.
[1, 44]
[1, 44]
B.
[1, 2, 3, 44]
[1, 2, 3, 44]
C.
[44, 2, 3]
[44, 2, 3]
D.
[1, 2, 3]
[1, 2, 3]
Question No# :
15
out of 50
<p>What is the output of the following?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print(max([1, 2, 3, 4.] [4, 5, 6], [7]))</pre>
<p>निम्नलिखित का आउटपुट क्या है?</p><pre>print(max([1, 2, 3, 4], [4, 5, 6], [7]))</pre>
A.
[4,5, 6
[4,5, 6
B.
[7]
[7]
C.
[1, 2,3, 4]
[1, 2,3, 4]
D.
7
7
Question No# :
16
out of 50
Which of the following commands will create a list?
निम्नलिखित में से कौन सी कमांड एक लिस्ट क्रिएट करेगी ?
A.
list1 = list()
list1 = list()
B.
list1 = []
list1 = []
C.
list1 = list([1, 2, 3])
list1 = list([1, 2, 3])
D.
all of the mentioned
सभी का उल्लेख है
Question No# :
17
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">a= [1, 2, 3, 4, 5]<br></span><span style="font-size: 14px;">for i in range(1, 5):<br></span><span style="font-size: 14px;"> a[i-1] = a[i]<br></span><span style="font-size: 14px;">for i in range(0, 5):<br></span><span style="font-size: 14px;"> print(a[i],end = " ")</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a= [1, 2, 3, 4, 5]<br></span><span style="font-size: 14px;">for i in range(1, 5):<br></span><span style="font-size: 14px;"> a[i-1] = a[i]<br></span><span style="font-size: 14px;">for i in range(0, 5):<br></span><span style="font-size: 14px;"> print(a[i],end = " ")</span></pre>
A.
5 5 1 2 3
5 5 1 2 3
B.
5 1 2 3 4
5 1 2 3 4
C.
2 3 4 5 1
2 3 4 5 1
D.
2 3 4 5 5
2 3 4 5 5
Question No# :
18
out of 50
If a={5,6,7}, what happens when a.add(5) is executed?
यदि a = {5,6,7}, तो क्या होता है जब a.add (5) निष्पादित होता है?
A.
a={5,5,6,7}
a={5,5,6,7}
B.
a={5,6,7}
a={5,6,7}
C.
Error as there is no add function for set data type
एरर के रूप में सेट डेटा प्रकार के लिए कोई फ़ंक्शन नहीं है
D.
Error as 5 already exists in the set
5 के रूप में एरर पहले से ही सेट में मौजूद है
Question No# :
19
out of 50
What is the output of the following program ? print "Hello World".[::-1]
निम्नलिखित प्रोग्राम का आउटपुट क्या है? print "Hello World".[::-1]
A.
dlroWolleH
dlroWolleH
B.
Hello Worl
Hello Worl
C.
d
d
D.
Error
Error
Question No# :
20
out of 50
<p>What does the following code print ?</p><pre>x = 'mohan'<br>for i in range (len(x)):<br> x[i].upper()<br>print (x)</pre><div><br></div>
<p>निम्नलिखित कोड क्या प्रिंट करता है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">x = 'mohan'<br>for i in range (len(x)):<br> x[i].upper()<br>print (x)</pre>
A.
mohan
mohan
B.
MOHAN
MOHAN
C.
Error
Error
D.
None of These
None of These
Question No# :
21
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print(''.isdigit())</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(''.isdigit())</span></pre>
A.
True
True
B.
False
False
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
22
out of 50
<p>What data type is the object below ? </p><pre>L=[1, 23, 'hello', 1]</pre>
<p>नीचे दिया गया ऑब्जेक्ट किस प्रकार का डेटा है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">L=[1, 23, 'hello', 1]</pre>
A.
List
List
B.
Dictionary
Dictionary
C.
Tuple
Tuple
D.
Array
Array
Question No# :
23
out of 50
Given a string s="Welcome", which of the following code is incorrect ?
एक स्ट्रिंग s="Welcome" में निम्नलिखित में से कौन सा कोड गलत है?
A.
print s[0]
print s[0]
B.
print s.lower()
print s.lower()
C.
s[1]='r'
s[1]='r'
D.
print s.strip()
print s.strip()
Question No# :
24
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('11'.isnumeric())</span></pre><div><br></div>
<p>निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('11'.isnumeric())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
25
out of 50
<p>What will be the output of the following Python code?</p><pre>d = {0: 'a', 1: 'b', 2: 'c'}<br>for x in d.values():<br> print(d[x])</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d = {0: 'a', 1: 'b', 2: 'c'}<br>for x in d.values():<br> print(d[x])</pre>
A.
0 1 2
0 1 2
B.
a b c
a b c
C.
0 a 1 b 2 c
0 a 1 b 2 c
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
26
out of 50
<p>What is the correct command to shuffle the following list?</p><pre><span style="font-size: 14px;">fruit=['apple', 'banana', 'papaya', 'cherry']</span></pre><div><br></div><p> </p>
<p>निम्नलिखित सूची में फेरबदल करने के लिए सही कमांड क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">fruit=['apple', 'banana', 'papaya', 'cherry']</span></pre>
A.
fruit.shuffle()
fruit.shuffle()
B.
shuffle(fruit)
shuffle(fruit)
C.
random.shuffle(fruit)
random.shuffle(fruit)
D.
random.shuffleList(fruit)
random.shuffleList(fruit)
Question No# :
27
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in x:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> x.upper()</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in x:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> x.upper()</span></pre>
A.
a B C D
a B C D
B.
a b c d
a b c d
C.
A B C D
A B C D
D.
error
error
Question No# :
28
out of 50
Which of the following is not a valid set operation in python?
निम्नलिखित में से कौन सा पायथन में वैध सेट ऑपरेशन नहीं है?
A.
Union
Union
B.
Intersection
Intersection
C.
Difference
Difference
D.
None of the above
None of the above
Question No# :
29
out of 50
Which of the following is true about Python strings?
पायथन स्ट्रिंग्स के बारे में निम्नलिखित में से कौन सा सत्य है?
A.
Strings can be modified using indexing.
इंडेक्सिंग का यूज़ करके स्ट्रिंग्स को मॉडिफाइड किया जा सकता है।
B.
Strings are immutable.
स्ट्रिंग्स इम्म्यूटेबल हैं.
C.
Strings can only contain alphabetic characters.
स्ट्रिंग्स में केवल अल्फ़ाबेट कैरेक्टर्स हो सकते हैं।
D.
Strings must end with a newline character.
स्ट्रिंग्स को एक न्यूलाइन कैरेक्टर के साथ एन्ड होना चाहिए।
Question No# :
30
out of 50
Which of the following are valid string manipulation functions in python?
निम्नलिखित में से कौन से पायथन में वैध स्ट्रिंग मैनिपुलेशन फ़ंक्शन हैं?
A.
count()
count()
B.
upper()
upper()
C.
strip()
strip()
D.
All the above
ऊपर के सभी
Question No# :
31
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">a.setdefault(4,"D") <br></font><font color="#333333">print(a)</font></pre><div><br></div>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">a.setdefault(4,"D") <br></font><font color="#333333">print(a)</font></pre>
A.
{1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}
{1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}
B.
None
कोई नहीं
C.
Error
एरर
D.
[1,3,6,10]
[1,3,6,10]
Question No# :
32
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print([i.lower() for i in "HELLO"])</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print([i.lower() for i in "HELLO"])</span></pre>
A.
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
B.
‘hello’
‘हैलो’
C.
[‘hello’]
[‘हैलो’]
D.
hello
हैलो
Question No# :
33
out of 50
Which of the following functions will return the symmetric difference between two sets, x and y?
निम्नलिखित में से कौन सा कार्य दो सेटों, x और y के बीच सिमेट्रिक डिफ्रेंस को रिटर्न करेगा ?
A.
x | y
x | y
B.
x ^ y
x ^ y
C.
x & y
x & y
D.
x – y
x – y
Question No# :
34
out of 50
If no delimiter is given in split() function then words are separated by
यदि split () फंक्शन में कोई डेलीमीटर नहीं दिया गया है तो शब्दों को ____द्वारा अलग किया जाता है
A.
space
स्पेस
B.
colon
कोलन
C.
semi colon
सेमी कोलन
D.
None
कोई नहीं
Question No# :
35
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('xyyxyyxyxyxxy'.replace('xy', '12', 100))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('xyyxyyxyxyxxy'.replace('xy', '12', 100))</span></pre>
A.
xyyxyyxyxyxxy
xyyxyyxyxyxxy
B.
12y12y1212x12
12y12y1212x12
C.
none of the mentioned
उल्लेखित कोई नहीं
D.
error
एरर
Question No# :
36
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">a={5,6,7,8}<br></span><span style="font-size: 14px;">b={7,8,9,10} <br></span><span style="font-size: 14px;">print(len(a+b))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a={5,6,7,8}<br></span><span style="font-size: 14px;">b={7,8,9,10} <br></span><span style="font-size: 14px;">print(len(a+b))</span></pre>
A.
8
8
B.
Error, unsupported operand ‘+’ for sets
Error, unsupported operand ‘+’ for sets
C.
6
6
D.
Nothing is displayed
कुछ भी डिस्प्लेड नहीं है
Question No# :
37
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre> <span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(list(d.keys()))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"> <span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(list(d.keys()))</span></pre>
A.
[“john”, “peter”]
[“john”, “peter”]
B.
[“john”:40, “peter”:45]
[“john”:40, “peter”:45]
C.
(“john”, “peter”)
(“john”, “peter”)
D.
(“john”:40, “peter”:45)
(“john”:40, “peter”:45)
Question No# :
38
out of 50
<p>What will be the output of the following Python code?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""><span style="font-size: 12.6px;">places = ['Bangalore', 'Mumbai', 'Delhi'] places1 = places places2 = places[:] places1[1]="Pune" places2[2]="Hyderabad" print(places)</span><br></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre class="de1" lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"="" style="font-size: 12.6px; letter-spacing: 0.14px; border-radius: 0px; padding: 0px;">places = ['Bangalore', 'Mumbai', 'Delhi'] places1 = places places2 = places[:] places1[1]="Pune" places2[2]="Hyderabad" print(places)</pre>
A.
[‘Bangalore’, ‘Pune’, ‘Hyderabad’]
[‘Bangalore’, ‘Pune’, ‘Hyderabad’]
B.
[‘Bangalore’, ‘Pune’, ‘Delhi’]
[‘Bangalore’, ‘Pune’, ‘Delhi’]
C.
[‘Bangalore’, ‘Mumbai’, ‘Delhi’]
[‘Bangalore’, ‘Mumbai’, ‘Delhi’]
D.
[‘Bangalore’, ‘Mumbai’, ‘Hyderabad’]
[‘Bangalore’, ‘Mumbai’, ‘Hyderabad’]
Question No# :
39
out of 50
Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
मान लीजिए कि लिस्ट 1 है [2, 33, 222, 14, 25], लिस्ट 1 [-1] क्या है?
A.
Error
एरर
B.
None
कोई नहीं
C.
25
25
D.
2
2
Question No# :
40
out of 50
<p>What will be the output of the following Python code?</p><pre>list1=[1,3]<br>list2=list1<br>list1[0]=4<br>print(list2)</pre><div><br></div>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">list1=[1,3]<br>list2=list1<br>list1[0]=4<br>print(list2)</pre>
A.
[1, 4]
[1, 4]
B.
[1,3, 4]
[1,3, 4]
C.
[4,3]
[4,3]
D.
[1,3]
[1,3]
Question No# :
41
out of 50
<p>What will be the output of the following Python code?</p><pre>d = {0, 1, 2}<br>for x in d.values():<br> print(x)</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d = {0, 1, 2}<br>for x in d.values():<br> print(x)</pre>
A.
0 1 2
0 1 2
B.
None None None
कोई नहीं कोई नहीं
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
42
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('Ab!2'.swapcase())</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('Ab!2'.swapcase())</span></pre>
A.
AB!@
AB!@
B.
ab12
ab12
C.
aB!2
aB!2
D.
aB1@
aB1@
Question No# :
43
out of 50
To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?
स्ट्रिंग 3 = "हैलो" से इंडेक्स 3 पर character को रिट्रीव करने के लिए हम किस कमांड को एक्सक्यूट करते हैं (multiple answers allowed)?
A.
s[]
s[]
B.
s.getitem(3)
s.getitem(3)
C.
s.__getitem__(3)
s.__getitem__(3)
D.
s.getItem(3)
s.getItem(3)
Question No# :
44
out of 50
To add a new element to a list we use which command?
एक लिस्ट में एक न्यू एलिमेंट ऐड करने के लिए हम किस कमांड का यूज़ करते हैं?
A.
list1.add(5)
list1.add(5)
B.
list1.append(5)
list1.append(5)
C.
list1.addLast(5)
list1.addLast(5)
D.
list1.addEnd(5)
list1.addEnd(5)
Question No# :
45
out of 50
<p>What is the output of the following code:</p><pre><span style="font-size: 14px;">L=['a','b','c','d']<br></span><span style="font-size: 14px;">print ( "".join(L))</span></pre><div><br></div>
<p>निम्नलिखित कोड का परिणाम क्या है:</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">L=['a','b','c','d']<br></span><span style="font-size: 14px;">print ( "".join(L))</span></pre>
A.
Error
Error
B.
None
None
C.
abcd
abcd
D.
[‘a’,’b’,’c’,’d’]
[‘a’,’b’,’c’,’d’]
Question No# :
46
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">i = "a"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> x = x[1:]<br></span><span style="font-size: 14px;"> print(i, end = " ")</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = "abcdef"<br></span><span style="font-size: 14px;">i = "a"<br></span><span style="font-size: 14px;">while i in x:<br></span><span style="font-size: 14px;"> x = x[1:]<br></span><span style="font-size: 14px;"> print(i, end = " ")</span></pre>
A.
a a a a a a
a a a a a a
B.
a
a
C.
no output
नो आउटपुट
D.
error
एरर
Question No# :
47
out of 50
Which function is used to add an element (5) in the list1?
लिस्ट 1 में एक एलिमेंट (5 ) जोड़ने के लिए किस फंक्शन का प्रयोग किया जाता है ?
A.
list1.sum(5)
list1.sum(5)
B.
list1.add(5)
list1.add(5)
C.
listl.append(5)
listl.append(5)
D.
list1.addelement(5)
list1.addelement(5)
Question No# :
48
out of 50
What is the data type of (1)?
(1) का डेटा प्रकार क्या है?
A.
Tuple
टपल
B.
Integer
इन्टिजर
C.
List
लिस्ट
D.
Both tuple and integer
टपल और इन्टिजर दोनों
Question No# :
49
out of 50
Which of the following methods is used to check if a string starts with a specific prefix?
निम्नलिखित में से किस मेथड का यूज़ यह चेक करने के लिए किया जाता है कि कोई स्ट्रिंग किसी स्पेसिफ़िक प्रीफ़िक्स से स्टार्ट होती है या नहीं?
A.
startswith()
startswith()
B.
startswith_prefix()
startswith_prefix()
C.
startswithwith()
startswithwith()
D.
startswiths()
startswiths()
Question No# :
50
out of 50
Assume q= [3, 4, 5, 20, 5, 25, 1, 3], then what will be the items of q list after q.pop(1) ?
मान लीजिए q= [3, 4, 5, 20, 5, 25, 1, 3], तो q.pop(1) के बाद q सूची में क्या आइटम होंगे?
A.
[3, 4, 5, 20, 5, 25, 1, 3]
[3, 4, 5, 20, 5, 25, 1, 3]
B.
[1, 3, 3, 4, 5, 5, 20, 25]
[1, 3, 3, 4, 5, 5, 20, 25]
C.
[3, 5, 20, 5, 25, 1, 3]
[3, 5, 20, 5, 25, 1, 3]
D.
[1, 3, 4, 5, 20, 5, 25]
[1, 3, 4, 5, 20, 5, 25]
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2026
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Best Website and Software Company in Allahabad