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
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# :
02
out of 50
Python allows ____ operations on string data type .
पायथन स्ट्रिंग डेटा प्रकार पर ____ऑपरेशन की अनुमति देता है।
A.
Concatenation
कॉनकैटनेशन
B.
Membership
मेंबरशिप
C.
Slicing
स्लाईसिंग
D.
All of the above
उपर्युक्त सभी
Question No# :
03
out of 50
<p>What will be the output of the following Python code?</p><pre>myList = [1, 2, 3, 4, 5, 6]<br>for i in range(1, 6):<br> myList[i - 1] = myList[i] <br>for i in range(0, 6): <br> print(myList[i], end = " ")</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">myList = [1, 2, 3, 4, 5, 6]<br>for i in range(1, 6):<br> myList[i - 1] = myList[i] <br>for i in range(0, 6): <br> print(myList[i], end = " ")</pre>
A.
2 3 4 5 6 1
2 3 4 5 6 1
B.
6 1 2 3 4 5
6 1 2 3 4 5
C.
2 3 4 5 6 6
2 3 4 5 6 6
D.
1 1 2 3 4 5
1 1 2 3 4 5
Question No# :
04
out of 50
Which of the following functions cannot be used on heterogeneous sets?
निम्न में से किस फ़ंक्शन का यूज़ हेटरजीन्यस सेटों पर नहीं किया जा सकता है?
A.
pop
पॉप
B.
remove
रिमूव
C.
update
अपडेट
D.
sum
सम
Question No# :
05
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# :
06
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# :
07
out of 50
Which of the following function of dictionary gets all the keys from the dictionary
निम्नलिखित में से डिक्शनरी का कौन सा फ़ंक्शन डिक्शनरी से सभी की निकालने के लिए किया जाता है
A.
getkeys()
getkeys()
B.
key()
key()
C.
keys()
keys()
D.
none of the mentioned
none of the mentioned
Question No# :
08
out of 50
What is a Python dictionary?
पायथन डिक्शनरी क्या है?
A.
A collection of ordered and mutable data
ऑर्डर्ड और म्युटेबल डेटा का कलेक्शन
B.
A collection of unordered and mutable data with key-value pairs
की-वैल्यू पेयर्स के साथ अनऑर्डर्ड और म्युटेबल डेटा का कलेक्शन
C.
A collection of immutable key-value pairs
म्म्यूटेबल की-वैल्यू पेयर्स का कलेक्शन
D.
A collection of values only
केवल वैल्यूज का कलेक्शन
Question No# :
09
out of 50
<p>What will be the output of the following Python code?</p><pre>list1 = [11, 2, 23]<br>list2 = [11, 2, 2]<br>print(list1 < list2)</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">list1 = [11, 2, 23]<br>list2 = [11, 2, 2]<br>print(list1 < list2)</pre>
A.
True
सही
B.
False
गलत
C.
Error
एरर
D.
None
कोई नहीं
Question No# :
10
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# :
11
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('ab'.isalpha())</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('ab'.isalpha())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
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 is the output of the following program:</p><pre><span style="font-size: 14px;">print ("Hello World"[::-1])</span></pre>
<p> निम्नलिखित प्रोग्राम का आउटपुट क्या है:</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print ("Hello World"[::-1])</span></pre>
A.
dlroW olleH
dlroW olleH
B.
Hello Worl
Hello Worl
C.
D
D
D.
error
error
Question No# :
15
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('abcefd'.replace('cd', '12'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcefd'.replace('cd', '12'))</span></pre>
A.
ab1ef2
ab1ef2
B.
abcefd
abcefd
C.
ab1efd
ab1efd
D.
ab12ed2
ab12ed2
Question No# :
16
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# :
17
out of 50
<p>what is the output of the following code?</p><pre><span style="font-size: 12.6px;">M=['b' *x for x in range(4)] print(M)</span><br></pre>
<p>निम्नलिखित कोड का आउटपुट क्या है?</p><pre style=""><span style="font-size: 12.6px;">M=['b' *x for x in range(4)] print(M)</span><span style="font-size: 12.6px; letter-spacing: 0.14px;"><br></span></pre>
A.
['', 'b', 'bb', 'bbb']
['', 'b', 'bb', 'bbb']
B.
['b,'bb', "bbb', "bbbb']
['b,'bb', "bbb', "bbbb']
C.
['b','bb', bbb']
['b','bb', bbb']
D.
none of these
इनमे से कोई नहीं
Question No# :
18
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# :
19
out of 50
<p>What will be the output of the following Python code?</p><pre>names = ['Amir', 'Bear', 'Charlton', 'Daman']<br>print(names[-1][-1])</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">names = ['Amir', 'Bear', 'Charlton', 'Daman']<br>print(names[-1][-1])</pre>
A.
A
A
B.
Daman
Daman
C.
Error
Error
D.
n
n
Question No# :
20
out of 50
List is mutable and Tuple is immutable?
लिस्ट परिवर्तनशील है और टपल अपरिवर्तनीय है?
A.
Yes, list mutable and tuple immutable
Yes, list mutable and tuple immutable
B.
No, list and tuple both are mutable
No, list and tuple both are mutable
C.
No, list and tuple both are in immutable
No, list and tuple both are in immutable
D.
No, just opposite, list immutable and tuple mutable
No, just opposite, list immutable and tuple mutable
Question No# :
21
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# :
22
out of 50
To add a new element to a list we use which Python command?
लिस्ट में एक नया आइटम जोड़ने के लिए हम किस पायथन कमांड का उपयोग करते हैं?
A.
list1.addEnd (5)
list1.addEnd (5)
B.
list1.addLast (5)
list1.addLast (5)
C.
list1.append (5)
list1.append (5)
D.
list1.add(5)
list1.add(5)
Question No# :
23
out of 50
<p>What will be the output of the following Python code?</p> <pre><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">for i in a: <br></font><font color="#333333"> print(i,end=" ")</font></pre>
<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">for i in a: <br></font><font color="#333333"> print(i,end=" ")</font></pre>
A.
1 2 3
1 2 3
B.
‘A’ ‘B’ ‘C’
‘A’ ‘B’ ‘C’
C.
1 ‘A’ 2 ‘B’ 3 ‘C’
1 ‘A’ 2 ‘B’ 3 ‘C’
D.
Error, it should be: for i in a.items():
एरर , यह होनी चाहिए: i in a.items () में:
Question No# :
24
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('xyxxyyzxxy'.lstrip('xyy'))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('xyxxyyzxxy'.lstrip('xyy'))</span></pre>
A.
zxxy
zxxy
B.
xyxxyyzxxy
xyxxyyzxxy
C.
xyxzxxy
xyxzxxy
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
25
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", 0, 2))</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("xyyzxyzxzxyy".endswith("xyy", 0, 2))</span></pre>
A.
0
0
B.
1
1
C.
True
सही
D.
False
गलत
Question No# :
26
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('HelloWorld'.istitle())</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('HelloWorld'.istitle())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
27
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# :
28
out of 50
Which method is used to get all keys from a dictionary?
डिक्शनरी से सभी कीज़ प्राप्त करने के लिए किस मेथड का यूज़ किया जाता है?
A.
keys()
keys()
B.
getkeys()
getkeys()
C.
allkeys()
allkeys()
D.
keyvalues()
keyvalues()
Question No# :
29
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# :
30
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# :
31
out of 50
Which one of the following is inmmutable data type?
Which one of the following is inmmutable data type?
A.
list
लिस्ट
B.
set
सेट
C.
tuple
tuple
D.
dict
dict
Question No# :
32
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# :
33
out of 50
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
मान लीजिए लिस्ट [3, 4, 5, 20, 5, 25, 1, 3], है, listExample.pop(1) के बाद की लिस्ट1 क्या है।
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]
Question No# :
34
out of 50
Suppose list1 is [1, 3, 2], What is list1 * 2?
मान लीजिए लिस्ट 1 [1, 3, 2] है,लिस्ट 1 * 2 क्या है?
A.
[2, 6, 4]
[2, 6, 4]
B.
[1, 3, 2, 1, 3]
[1, 3, 2, 1, 3]
C.
[1, 3, 2, 1, 3, 2]
[1, 3, 2, 1, 3, 2]
D.
[1, 3, 2, 3, 2, 1]
[1, 3, 2, 3, 2, 1]
Question No# :
35
out of 50
What does the strip() method do in Python?
पायथन में स्ट्रिप() विधि क्या करती है?
A.
Removes all spaces from the string.
स्ट्रिंग से सभी स्पेसेस को रिमूव कर देती है.
B.
Removes the first and last character of the string.
स्ट्रिंग का फर्स्ट और लास्ट कैरेक्टर को रिमूव कर देता है।
C.
Removes whitespace from the beginning and end of the string.
स्ट्रिंग के बिगनिंग और एन्ड से वाइटस्पेस को रिमूव करता है।
D.
Converts the string into a list of characters.
स्ट्रिंग को कैरेक्टर्स की लिस्ट में कन्वर्ट करता है।
Question No# :
36
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre><font color="#333333">a={}<br></font><font color="#333333">a['a']=1<br></font><font color="#333333">a['b']=[2,3,4] <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={}<br></font><font color="#333333">a['a']=1<br></font><font color="#333333">a['b']=[2,3,4] <br></font><font color="#333333">print(a)</font></pre>
A.
Exception is thrown
एक्सेप्शन फेंक दिया जाता है
B.
{‘b’: [2], ‘a’: 1}
{‘b’: [2], ‘a’: 1}
C.
{‘b’: [2], ‘a’: [3]}
{‘b’: [2], ‘a’: [3]}
D.
{'a': 1, 'b': [2, 3, 4]}
{'a': 1, 'b': [2, 3, 4]}
Question No# :
37
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre><span class="sy0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">>>></span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"=""> a</span><span class="sy0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">=</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">{</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">1</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">:</span><span class="st0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(72,="" 61,="" 139);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">"A"</span><span class="sy0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">,</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">2</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">:</span><span class="st0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(72,="" 61,="" 139);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">"B"</span><span class="sy0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">,</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">3</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">:</span><span class="st0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(72,="" 61,="" 139);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">"C"</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">}<br></span><span class="sy0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">>>></span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"=""> </span><span class="kw1" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 119,="" 0);="" font-weight:="" bold;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">del</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"=""> a</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span class="sy0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">>>></span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);"> a</span><span class="sy0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">=</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">{</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">1</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">:</span><span class="st0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(72,="" 61,="" 139);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">"A"</span><span class="sy0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">,</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">2</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">:</span><span class="st0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(72,="" 61,="" 139);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">"B"</span><span class="sy0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">,</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">3</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">:</span><span class="st0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(72,="" 61,="" 139);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">"C"</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">}<br></span><span class="sy0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">>>></span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);"> </span><span class="kw1" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 119,="" 0);="" font-weight:="" bold;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">del</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);"> a</span></pre>
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
डेल ड़िक्शनरी में keys हटाता है
Question No# :
38
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# :
39
out of 50
<p>What will be the output of the following Python code?</p><pre>values = [[3, 4, 5, 1], [33, 6, 1, 2]]<br>v = values[0][0]<br>for lst in values:<br> for element in lst:<br> if v > element:<br> v = element<br>print(v)</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">values = [[3, 4, 5, 1], [33, 6, 1, 2]]<br>v = values[0][0]<br>for lst in values:<br> for element in lst:<br> if v > element:<br> v = element<br>print(v)</pre>
A.
1
1
B.
3
3
C.
5
5
D.
6
6
Question No# :
40
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('ab cd-ef'.title())</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('ab cd-ef'.title())</span></pre>
A.
Ab cd-ef
Ab cd-ef
B.
Ab Cd-ef
Ab Cd-ef
C.
Ab Cd-Ef
Ab Cd-Ef
D.
None of the mentioned
उल्लेखित कोई नहीं
Question No# :
41
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# :
42
out of 50
<p>What is the output of the following code?</p><pre>dict={"Joey":1, "Rachel":2}<br>dict.update({"Phoebe":2})<br>print(dict)</pre>
<p>निम्नलिखित कोड का आउटपुट क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">dict={"Joey":1, "Rachel":2}<br>dict.update({"Phoebe":2})<br>print(dict)</pre>
A.
{'Joey': 1, 'Rachel': 2, 'Phoebe': 2}
{'Joey': 1, 'Rachel': 2, 'Phoebe': 2}
B.
{“Joey”:1,”Rachel”:}
{“Joey”:1,”Rachel”:}
C.
{“Joey”:1,”Phoebe”:2}
{“Joey”:1,”Phoebe”:2}
D.
Error
Error
Question No# :
43
out of 50
Which of the following statements is used to create an empty set?
एम्प्टी सेट क्रिएट करने के लिए निम्नलिखित में से किस स्टेट्मेंट का यूज़ किया जाता है?
A.
{ }
{ }
B.
set()
set()
C.
[ ]
[ ]
D.
( )
( )
Question No# :
44
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre><font color="#333333">a = {}<br></font><font color="#333333">a[1] = 1<br></font><font color="#333333">a['1'] = 2<br></font><font color="#333333">a[1]=a[1]+1<br></font><font color="#333333">count = 0<br></font><font color="#333333">for i in a: <br></font><font color="#333333"> count += a[i]<br></font><font color="#333333">print(count)</font></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">a = {}<br></font><font color="#333333">a[1] = 1<br></font><font color="#333333">a['1'] = 2<br></font><font color="#333333">a[1]=a[1]+1<br></font><font color="#333333">count = 0<br></font><font color="#333333">for i in a: <br></font><font color="#333333"> count += a[i]<br></font><font color="#333333">print(count)</font></pre>
A.
1
1
B.
2
2
C.
4
4
D.
Error, the keys can’t be a mixture of letters and numbers
एरर,keys लेटर्स और नंबर्स का मिक्चर नहीं हो सकता
Question No# :
45
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# :
46
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# :
47
out of 50
Which of the following is a mapping datatype?
निम्न में से कौन एक मैपिंग डेटाटाइप है?
A.
String
स्ट्रिंग
B.
List
लिस्ट
C.
Tuple
टपल
D.
Dictionary
डिक्शनरी
Question No# :
48
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:<br> print(d.add(x))</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d = {0, 1, 2}<br>for x in d:<br> print(d.add(x))</pre>
A.
0 1 2
0 1 2
B.
0 1 2 0 1 2 0 1 2 …
0 1 2 0 1 2 0 1 2 …
C.
None None None
कोई नहीं कोई नहीं
D.
None of the mentioned
उल्लेखित कोई नहीं
Question No# :
49
out of 50
Suppose d = {"john”:40, “peter":45}. To obtain the number of entries in dictionary which command do we use?
मान लीजिए d = {"john":40, “peter":45}| डिक्शनरी में प्रविष्टियों की संख्या प्राप्त करने के लिए हम किस कमांड का उपयोग करते हैं?
A.
d.size()
d.size()
B.
len(d)
len(d)
C.
size(d)
size(d)
D.
d.len ()
d.len ()
Question No# :
50
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”
Latest Current Affairs 2025
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2025
Python Programming Tutorials
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
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Sarkari Exam Quiz