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
<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# :
02
out of 50
Which of the following function returns True if the string is non empty and has all uppercase alphabets.
यदि स्ट्रिंग नॉन-इम्पटी है और सभी अपरकेस अक्षर हैं, तो निम्न में से कौन सा फंक्शन सही है।
A.
islower()
islower()
B.
isupper()
isupper()
C.
Islower()
Islower()
D.
None
कोई नहीं
Question No# :
03
out of 50
Which statement is correct
कौन सा कथन सही है
A.
List is mutable & Tuple is immutable
सूची परिवर्तनशील है और टपल अपरिवर्तनीय है
B.
List is immutable & Tuple is mutable
सूची अपरिवर्तनीय है और टपल परिवर्तनशील है
C.
Both List and Tuple are Mutable
लिस्ट और टपल दोनों परिवर्तनशील हैं
D.
Both List and Tuple are Immutable
सूची और टपल दोनों अपरिवर्तनीय हैं
Question No# :
04
out of 50
Which of the statements about dictionary values if false?
ड़िक्शनरी वैल्यूज में से कौन सा स्टेट्मेंट यदि गलत है?
A.
More than one key can have the same value
एक से अधिक key की वैल्यू समान हो सकती है
B.
The values of the dictionary can be accessed as dict[key]
ड़िक्शनरी के वैल्यूज को एक्सेस्सड के रूप में देखा जा सकता है [key]
C.
Values of a dictionary must be unique
एक ड़िक्शनरी की वैल्यूज यूनिक होनी चाहिए
D.
Values of a dictionary can be a mixture of letters and numbers
एक ड़िक्शनरी की वैल्यूज लेटर्स और नंबर्स का मिक्चर हो सकता है
Question No# :
05
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre><font color="#333333">numbers = {}<br></font><font color="#333333">letters = {}<br></font><font color="#333333">comb = {}<br></font><font color="#333333">numbers[1] = 56<br></font><font color="#333333">numbers[3] = 7<br></font><font color="#333333">letters[4] = 'B'<br></font><font color="#333333">comb['Numbers'] = numbers <br></font><font color="#333333">comb['Letters'] = letters<br></font><font color="#333333">print(comb)</font></pre><div><br></div>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">numbers = {}<br></font><font color="#333333">letters = {}<br></font><font color="#333333">comb = {}<br></font><font color="#333333">numbers[1] = 56<br></font><font color="#333333">numbers[3] = 7<br></font><font color="#333333">letters[4] = 'B'<br></font><font color="#333333">comb['Numbers'] = numbers <br></font><font color="#333333">comb['Letters'] = letters<br></font><font color="#333333">print(comb)</font></pre>
A.
Error, dictionary in a dictionary can’t exist
एरर,डिक्शनरी में ड़िक्शनरी मौजूद नहीं है
B.
‘Numbers’: {1: 56, 3: 7}
‘Numbers’: {1: 56, 3: 7}
C.
{‘Numbers’: {1: 56}, ‘Letters’: {4: ‘B’}}
{‘Numbers’: {1: 56}, ‘Letters’: {4: ‘B’}}
D.
{‘Numbers’: {1: 56, 3: 7}, ‘Letters’: {4: ‘B’}}
{‘Numbers’: {1: 56, 3: 7}, ‘Letters’: {4: ‘B’}}
Question No# :
06
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# :
07
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# :
08
out of 50
<p>What will be the output of the following code snippet?</p><pre><span style="font-size: 14px;">a=[1,2,3,4,5,6,7,8,9]<br></span><span style="font-size: 14px;">a[::2]=10,20,30,40,50,60<br></span><span style="font-size: 14px;">print(a)</span></pre><div><br></div>
<p>निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a=[1,2,3,4,5,6,7,8,9]<br></span><span style="font-size: 14px;">a[::2]=10,20,30,40,50,60<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
ValueError: attempt to assign sequence of size 6 to extended slice of size 5
ValueError: attempt to assign sequence of size 6 to extended slice of size 5
B.
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
C.
[1, 2, 10, 20, 30, 40, 50, 60]
[1, 2, 10, 20, 30, 40, 50, 60]
D.
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
Question No# :
09
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">a=[(2,4),(1,2),(3,9)]<br></span><span style="font-size: 14px;">a.sort()<br></span><span style="font-size: 14px;">print(a)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a=[(2,4),(1,2),(3,9)]<br></span><span style="font-size: 14px;">a.sort()<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
[(1, 2), (2, 4), (3, 9)]
[(1, 2), (2, 4), (3, 9)]
B.
[(2,4),(1,2),(3,9)]
[(2,4),(1,2),(3,9)]
C.
Error because tuples are immutable
एरर क्योंकि tuples अपरिवर्तनीय हैं
D.
Error, tuple has no sort attribute
एरर , टपल का कोई प्रकार नहीं है
Question No# :
10
out of 50
<p>What will be the output of the following code snippet?</p><pre><span style="font-size: 12.6px;">d={3,4,5} for k in d: print(k)</span></pre>
<p>निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?</p><pre style=""><span style="font-size: 12.6px;">d={3,4,5} for k in d: print(k)</span><span style="font-size: 12.6px; letter-spacing: 0.14px;"></span></pre>
A.
{3, 4, 5},{3, 4, 5}, {3, 4, 5}
{3, 4, 5},{3, 4, 5}, {3, 4, 5}
B.
3 4 5
3 4 5
C.
syntax error
syntax error
D.
None of the above
उपरोक्त में से कोई नहीं
Question No# :
11
out of 50
If wd="Hello World" then which of the following statements will display last five characters of the string object?
If wd="Hello World" then which of the following statements will display last five characters of the string object?
A.
wd[4:]
wd[4:]
B.
wd[:4]
wd[:4]
C.
wd[-5:]
wd[-5:]
D.
wd[:-4]
wd[:-4]
Question No# :
12
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("Welcome to Python".split())</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("Welcome to Python".split())</span></pre>
A.
[“Welcome”, “to”, “Python”]
[“Welcome”, “to”, “Python”]
B.
(“Welcome”, “to”, “Python”)
(“Welcome”, “to”, “Python”)
C.
{“Welcome”, “to”, “Python”}
{“Welcome”, “to”, “Python”}
D.
“Welcome”, “to”, “Python”
“Welcome”, “to”, “Python”
Question No# :
13
out of 50
To shuffle the list(say list1) what function do we use?
लिस्ट में शफल (फेरबदल) करने के लिए (say list1) हम किस फ़ंक्शन का यूज़ करते हैं?
A.
list1.shuffle()
list1.shuffle()
B.
shuffle(list1)
shuffle(list1)
C.
random.shuffle(list1)
random.shuffle(list1)
D.
random.shuffleList(list1)
random.shuffleList(list1)
Question No# :
14
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">string = "my name is x"<br></span><span style="font-size: 14px;">for i in string.split():<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;">string = "my name is x"<br></span><span style="font-size: 14px;">for i in string.split():<br></span><span style="font-size: 14px;"> print (i, end=", ")</span></pre>
A.
m, y, , n, a, m, e, , i, s, , x,
m, y, , n, a, m, e, , i, s, , x,
B.
m, y, , n, a, m, e, , i, s, , x
m, y, , n, a, m, e, , i, s, , x
C.
my, name, is, x,
my, name, is, x,
D.
error
एरर
Question No# :
15
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# :
16
out of 50
<p>What is the output when we execute </p><pre>list("hello") ? </pre>
<p>जब हम लिस्ट ("हैलो") एक्सेक्यूट करते हैं तो आउटपुट क्या होता है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">list("hello") ?</pre>
A.
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
B.
[' hello']
[' hello']
C.
['llo']
['llo']
D.
['olleh']
['olleh']
Question No# :
17
out of 50
<p>What will be the output of the following ?</p><pre><span style="font-size: 14px;">print((range(4)))</span></pre>
<p>निम्नलिखित का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print((range(4)))</span></pre>
A.
0,1,2,3
0,1,2,3
B.
[0,1,2,3]
[0,1,2,3]
C.
range(0, 4)
range(0, 4)
D.
(0,1,2,3)
(0,1,2,3)
Question No# :
18
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">string = "my name is x"<br></span><span style="font-size: 14px;">for i in string:<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;">string = "my name is x"<br></span><span style="font-size: 14px;">for i in string:<br></span><span style="font-size: 14px;"> print (i, end=", ")</span></pre>
A.
m, y, , n, a, m, e, , i, s, , x,
m, y, , n, a, m, e, , i, s, , x,
B.
m, y, , n, a, m, e, , i, s, , x
m, y, , n, a, m, e, , i, s, , x
C.
my, name, is, x,
my, name, is, x,
D.
error
error
Question No# :
19
out of 50
<p>What will be the output of the following code?</p><pre><span style="font-size: 14px;">a=((0,2,3,4)[1:-2])<br></span><span style="font-size: 14px;">print(a)</span></pre><div><br></div>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a=((0,2,3,4)[1:-2])<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
(3,)
(3,)
B.
(2, )
(2, )
C.
(1,)
(1,)
D.
(0,)
(0,)
Question No# :
20
out of 50
Which operation extracts part of a sequence?
कौन सी क्रिया अनुक्रम के एक भाग को निकालती है?
A.
Appending
Appending
B.
Concatenation
Concatenation
C.
Deleting
Deleting
D.
Slicing
Slicing
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;">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# :
22
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# :
23
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("xyyzxyzxzxyy".count('xyy', 2, 11))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("xyyzxyzxzxyy".count('xyy', 2, 11))</span></pre>
A.
2
2
B.
0
0
C.
1
1
D.
error
एरर
Question No# :
24
out of 50
Which of these about a frozenset is not true?
फ्रोजेनसेट के बारे में इनमें से कौन सा सच नहीं है?
A.
Mutable data type
म्यूटेबल डेटा टाइप
B.
Allows duplicate values
डुप्लिकेट वैल्यूज की अनुमति देता है
C.
Data type with unordered values
अव्यवस्थित वैल्यूज के साथ डेटा टाइप
D.
Immutable data type
इम्यूटबल डेटा टाइप
Question No# :
25
out of 50
What type of data is : arr=[(1,1),(2,2),(3,3)]?
किस प्रकार का डेटा है: arr=[(1,1),(2,2),(3,3)]?
A.
List of tuple
List of tuple
B.
Tuple of List
Tuple of List
C.
Array of Tuples
Array of Tuples
D.
Invalid Type
Invalid Type
Question No# :
26
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(x)</pre><div><br></div>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</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(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# :
27
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("john" in d)</span></pre><div><br></div> <p> </p>
<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("john" in d)</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
28
out of 50
Suppose list1 is [2445,133,12454,123], what is max(list1)?
मान लीजिए कि लिस्ट 1 है [2445,133,12454,123],Max (लिस्ट1) क्या है?
A.
2445
2445
B.
133
133
C.
12454
12454
D.
123
123
Question No# :
29
out of 50
A sequence of immutable objects is called
अपरिवर्तनीय वस्तुओं का क्रम कहलाता है
A.
Built in
Built in
B.
List
List
C.
Tuple
Tuple
D.
Derived data
Derived data
Question No# :
30
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('abcd'.partition('cd'))</span></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcd'.partition('cd'))</span></pre>
A.
(‘ab’, ‘cd’, ”)
(‘ab’, ‘cd’, ”)
B.
(‘ab’, ‘cd’)
(‘ab’, ‘cd’)
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
31
out of 50
<p>What is the output of following code</p><pre><span style="font-size: 14px;">a=[2,3,4,5]<br></span><span style="font-size: 14px;">a.insert(3,1)<br></span><span style="font-size: 14px;">print(a)</span></pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a=[2,3,4,5]<br></span><span style="font-size: 14px;">a.insert(3,1)<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
[3,2,3,4,5]
[3,2,3,4,5]
B.
[2, 3, 4, 1, 5]
[2, 3, 4, 1, 5]
C.
[2, 3,1, 4, 5]
[2, 3,1, 4, 5]
D.
[2, 3,3, 4, 5]
[2, 3,3, 4, 5]
Question No# :
32
out of 50
Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?
मान लीजिए कि लिस्ट 1 है [3, 5, 25, 1, 3],मिनट (लिस्ट 1)क्या है ?
A.
3
3
B.
5
5
C.
25
25
D.
1
1
Question No# :
33
out of 50
Choose the correct option with respect to Python..
पायथन के संबंध में सही विकल्प चुनें।
A.
In Python, a tuple can contain only integers as its elements.
पायथन में, एक टपल में इसके एलीमेंट के रूप में केवल इंटीजर हो सकते हैं।
B.
In Python, a tuple can contain only strings as its elements.
पायथन में, एक टपल में इसके एलीमेंट के रूप में केवल स्ट्रींग हो सकते हैं।
C.
In Python, a tuple can contain both integers and strings as its elements.
पायथन में, एक टपल में इसके एलीमेंट के रूप में इंटीजर और स्ट्रिंग दोनों हो सकते हैं ।
D.
In Python, a tuple can contain either string or integer but not both at a time.
पायथन में, एक टपल में या तो स्ट्रिंग हो सकते हैं, या तो इंटीजर, लेकिन एक समय में दोनों नहीं हो सकते हैं।
Question No# :
34
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">t=32.00<br></span><span style="font-size: 14px;">for x in t:<br></span><span style="font-size: 14px;"> print(x)</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">t=32.00<br></span><span style="font-size: 14px;">for x in t:<br></span><span style="font-size: 14px;"> print(x)</span></pre>
A.
[0]
[0]
B.
0
0
C.
[0.00]
[0.00]
D.
Error
एरर
Question No# :
35
out of 50
The ____________ function removes the first element of a set and the last element of a list.
____________ फ़ंक्शन सेट का फर्स्ट एलिमेंट् और किसी लिस्ट का लास्ट एलिमेंट निकालता है।
A.
remove
रिमूव
B.
pop
पॉप
C.
discard
डिस्कार्ड
D.
dispose
डिस्पोज़
Question No# :
36
out of 50
If a={5,6,7,8}, which of the following statements is false?
यदि a = {5,6,7,8}, निम्नलिखित में से कौन सा स्टेट्मेंट गलत है?
A.
print(len(a))
print(len(a))
B.
print(min(a))
print(min(a))
C.
a.remove(5)
a.remove(5)
D.
a[2]=45
a[2]=45
Question No# :
37
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">example = "helle"<br></span><span style="font-size: 14px;">print(example.find("e"))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">example = "helle"<br></span><span style="font-size: 14px;">print(example.find("e"))</span></pre>
A.
Error
एरर
B.
-1
-1
C.
1
1
D.
0
0
Question No# :
38
out of 50
What does the update() method do in a dictionary?
अपडेट() मेथड किसी ड़िक्शनरी में क्या करती है?
A.
Clears all key-value pairs
सभी की-वैल्यू पेयर्स क्लियर करता है
B.
Updates a specific key
किसी स्पेसिफ़िक कीज़ को अपडेट्स करता है
C.
Merges another dictionary into the current one
किसी अन्य ड़िक्शनरी को प्रेजेंट ड़िक्शनरी में मर्ज कर देता है
D.
Removes all values
सभी वैल्यूज रिमूव कर देता है
Question No# :
39
out of 50
<p>What is the output of following code</p><pre>a=[1,2,3]<br>a[::-1]<br>print(a)</pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a=[1,2,3]<br>a[::-1]<br>print(a)</pre>
A.
[1,2,3]
[1,2,3]
B.
[3,2,1]
[3,2,1]
C.
[2,1,3]
[2,1,3]
D.
[3,1,2]
[3,1,2]
Question No# :
40
out of 50
Which of the following operations is NOT allowed on a tuple?
टपल पर निम्नलिखित में से किस ऑपरेशन की अनुमति नहीं है?
A.
Slicing
स्लाइसिंग
B.
Concatenation
कंकटेनशन
C.
Deletion of elements
एलिमेंट्स का विलोपन
D.
Iteration
इट्रेशन
Question No# :
41
out of 50
Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)?
मान लीजिए कि list1 [3, 4, 5, 20, 5] है, list1.index (5) क्या है?
A.
0
0
B.
1
1
C.
4
4
D.
2
2
Question No# :
42
out of 50
Dictionary has:
डिक्सनरी में है:
A.
Sequence value pair
Sequence value pair
B.
Key value pair
Key value pair
C.
Tuple value pair
Tuple value pair
D.
Record value pair
Record value pair
Question No# :
43
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('xyyzxxyxyy'.lstrip('xyy'))</span></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('xyyzxxyxyy'.lstrip('xyy'))</span></pre>
A.
error
एरर
B.
zxxyxyy
zxxyxyy
C.
z
z
D.
zxxy
zxxy
Question No# :
44
out of 50
<p>What is the output of following code</p><pre><span style="font-size: 14px;">x = "HELLO"<br></span><span style="font-size: 14px;">print(x[1:-1])</span></pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = "HELLO"<br></span><span style="font-size: 14px;">print(x[1:-1])</span></pre>
A.
ELL
ELL
B.
ELLO
ELLO
C.
HELL
HELL
D.
LL
LL
Question No# :
45
out of 50
What is the correct way to create a tuple with a single element?
किसी सिंगल एलिमेंट से टपल क्रिएट करने का सही तरीका क्या है?
A.
(1)
(1)
B.
(1,)
(1,)
C.
[1]
[1]
D.
{1}
{1}
Question No# :
46
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=[13,56,17] a.append([87]) a.extend([45,67]) print(a)</span><br></pre><p style="border-radius: 0px; padding: 0px;"><br></p>
<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=[13,56,17] a.append([87]) a.extend([45,67]) print(a)</pre>
A.
[13, 56, 17, [87], 45, 67]
[13, 56, 17, [87], 45, 67]
B.
[13, 56, 17, 87, 45, 67]
[13, 56, 17, 87, 45, 67]
C.
[13, 56, 17, 87,[ 45, 67]]
[13, 56, 17, 87,[ 45, 67]]
D.
[13, 56, 17, [87], [45, 67]]
[13, 56, 17, [87], [45, 67]]
Question No# :
47
out of 50
How can we create an empty list in Python ?
हम पायथन में एक खाली लिस्ट कैसे बना सकते हैं?
A.
list=()
list=()
B.
list.null
list.null
C.
null.list
null.list
D.
list=[]
list=[]
Question No# :
48
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;">count={} count[(1,2,4)] = 5 count[(4,2,1)] = 7 count[(1,2)] = 6 count[(4,2,1)] = 2 tot = 0 for i in count: tot=tot+count[i] print(len(count)+tot)</span> </pre><div><br></div>
<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;">count={} count[(1,2,4)] = 5 count[(4,2,1)] = 7 count[(1,2)] = 6 count[(4,2,1)] = 2 tot = 0 for i in count: tot=tot+count[i] print(len(count)+tot)</pre>
A.
25
25
B.
17
17
C.
16
16
D.
Tuples can’t be made keys of a dictionary
Tuples को ड़िक्शनरी की key नहीं बनाया जा सकता है
Question No# :
49
out of 50
If a is a dictionary with some key-value pairs, what does a.popitem() do?
यदि कुछ की-वैल्यू वाले पेअर के साथ एक ड़िक्शनरी है,तो a.popitem () क्या करता है?
A.
Removes an arbitrary element
एक आर्बिट्रेरी एलिमेंट्स रिमूव करता है
B.
Removes all the key-value pairs
सभी की-वैल्यू पेयर्स रिमूव करता है
C.
Removes the key-value pair for the key given as an argument
आर्ग्यमन्ट के रूप में दी गई key के लिए की-वैल्यू पेयर्स को रिमूव करती है
D.
Invalid method for dictionary
ड़िक्शनरी के लिए इनवैलिड मैथड
Question No# :
50
out of 50
<p>What will be the output of the following Python code?</p> <pre>a={1:"A",2:"B",3:"C"}<br>print(a.items())</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a={1:"A",2:"B",3:"C"}<br>print(a.items())</pre>
A.
Syntax error
सिंटेक्स एरर
B.
dict_items([(‘A’), (‘B’), (‘C’)])
dict_items([(‘A’), (‘B’), (‘C’)])
C.
dict_items([(1,2,3)])
dict_items([(1,2,3)])
D.
dict_items([(1, ‘A’), (2, ‘B’), (3, ‘C’)])
dict_items([(1, ‘A’), (2, ‘B’), (3, ‘C’)])
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