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>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# :
02
out of 50
Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a value using the expression d[“susan”]?
मान लीजिए कि d = {"जॉन": 40, "पीटर": 45}, तब क्या होता है जब हम एक्सप्रेशन का यूज़ करते हुए value प्राप्त करने का प्रयास करते हैं d[“susan”]?
A.
Since “susan” is not a value in the set, Python raises a KeyError exception
चूँकि "सुसान" सेट में कोई वैल्यू नहीं है,Python एक की एरर एक्सेप्शन्स को उठाता है
B.
It is executed fine and no exception is raised, and it returns None
इसे एक्सक्यूट किया जाता है और कोई एक्सेप्शन्स नहीं उठाया जाता है, और यह कोई भी नहीं रिटर्न करता है
C.
Since “susan” is not a key in the set, Python raises a KeyError exception
चूँकि "सुसान" सेट में कोई की नहीं है,Python एक की एरर एक्सेप्शन्स को उठाता है
D.
Since “susan” is not a key in the set, Python raises a syntax error
चूंकि "सुसान" सेट में एक की नहीं है,Python एक सिंटेक्स एरर उठाता है
Question No# :
03
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# :
04
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">example = "snow world"<br></span><span style="font-size: 14px;">example[3] = 's'<br></span><span style="font-size: 14px;">print (example)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">example = "snow world"<br></span><span style="font-size: 14px;">example[3] = 's'<br></span><span style="font-size: 14px;">print (example)</span></pre>
A.
snow
स्नो
B.
snow world
स्नो वर्ल्ड
C.
Error
एरर
D.
snos world
स्नोस वर्ल्ड
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">print(a.get(3))</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">print(a.get(3))</font></pre>
A.
Error, invalid syntax
एरर,इनवैलिड सिंटैक्स
B.
A
A
C.
5
5
D.
C
C
Question No# :
06
out of 50
What does the function re.match do?
फंक्शन re-match क्या करता है?
A.
matches a pattern at the start of the string.
स्ट्रिंग की शुरुआत में एक पैटर्न से मेल खाता है
B.
matches a pattern at any position in the string.
स्ट्रिंग में किसी भी स्थिति में एक पैटर्न से मेल खाता है
C.
such a function does not exist
ऐसा कोई फंक्शन मौजूद नहीं है
D.
none of the mentioned
उल्लिखित कोई नहीं ।
Question No# :
07
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# :
08
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# :
09
out of 50
<p>What will be the output of the following Python code?</p> <pre><font color="#333333">a={1:5,2:3,3:4}<br></font><font color="#333333">a.pop(3) <br></font><font color="#333333">print(a)</font></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">a={1:5,2:3,3:4}<br></font><font color="#333333">a.pop(3) <br></font><font color="#333333">print(a)</font></pre>
A.
{1: 5}
{1: 5}
B.
{1: 5, 2: 3}
{1: 5, 2: 3}
C.
Error, syntax error for pop() method
एरर, पॉप () मैथड के लिए सिंटैक्स एरर
D.
{1: 5, 3: 4}
{1: 5, 3: 4}
Question No# :
10
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# :
11
out of 50
<p>What is the output of the following statement ?</p><pre>print ((2, 4) + (1, 5))</pre>
<p>निम्नलिखित कथन का आउटपुट क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print ((2, 4) + (1, 5))</pre>
A.
(2 , 4), (4 , 5)
(2 , 4), (4 , 5)
B.
(3 , 9)
(3 , 9)
C.
(2, 4, 1, 5)
(2, 4, 1, 5)
D.
Invalid Syntax
Invalid Syntax
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;">print('abcdefcdghcd'.split('cd'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdefcdghcd'.split('cd'))</span></pre>
A.
[‘ab’, ‘ef’, ‘gh’]
[‘ab’, ‘ef’, ‘gh’]
B.
[‘ab’, ‘ef’, ‘gh’, ”]
[‘ab’, ‘ef’, ‘gh’, ”]
C.
(‘ab’, ‘ef’, ‘gh’)
(‘ab’, ‘ef’, ‘gh’)
D.
(‘ab’, ‘ef’, ‘gh’, ”)
(‘ab’, ‘ef’, ‘gh’, ”)
Question No# :
13
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# :
14
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">mylist=list("a#b#c#d".split('#'))<br></span><span style="font-size: 14px;">print(mylist)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">mylist=list("a#b#c#d".split('#'))<br></span><span style="font-size: 14px;">print(mylist)</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.
[‘abcd’]
[‘abcd’]
Question No# :
15
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={} a[2]=1 a[1]=[2,3,4] print(a[1][1])</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;">a={} a[2]=1 a[1]=[2,3,4] print(a[1][1])</pre>
A.
[2,3,4]
[2,3,4]
B.
3
3
C.
2
2
D.
An exception is thrown
एक एक्सेप्शन फेंक दिया जाता है
Question No# :
16
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print(max("what are you"))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(max("what are you"))</span></pre>
A.
error
एरर
B.
u
u
C.
t
t
D.
y
y
Question No# :
17
out of 50
<p>What will be the output of the following Python code?</p><pre>matrix = [[1, 2, 3, 4],<br> [4, 5, 6, 7],<br> [8, 9, 10, 11],<br> [12, 13, 14, 15]] <br>for i in range(0, 4):<br> print(matrix[i][1], end = " ")</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">matrix = [[1, 2, 3, 4],<br> [4, 5, 6, 7],<br> [8, 9, 10, 11],<br> [12, 13, 14, 15]] <br>for i in range(0, 4):<br> print(matrix[i][1], end = " ")</pre>
A.
1 2 3 4
1 2 3 4
B.
4 5 6 7
4 5 6 7
C.
1 3 8 12
1 3 8 12
D.
2 5 9 13
2 5 9 13
Question No# :
18
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# :
19
out of 50
Which of the following statements create a dictionary?
निम्नलिखित में से कौन सा स्टेट्मेंट एक ड़िक्शनरी बनाता है?
A.
d = {}
d = {}
B.
d = {“john”:40, “peter”:45}
d = {“john”:40, “peter”:45}
C.
d = {40:”john”, 45:”peter”}
d = {40:”john”, 45:”peter”}
D.
All of the mentioned
सभी का उल्लेख
Question No# :
20
out of 50
In which of the following data type, duplicate items are not allowed ?
निम्नलिखित में से किस डेटा प्रकार में डुप्लीकेट आइटम की अनुमति नहीं है?
A.
List
List
B.
Dictionary
Dictionary
C.
Set
Set
D.
None of the Above
None of the Above
Question No# :
21
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# :
22
out of 50
If b is a dictionary, what does any(b) do?
यदि b एक डिक्शनरी है, तो कोई भी (b) क्या करता है?
A.
Returns True if any key of the dictionary is true
यदि डिक्शनरी की कोई भी key सही है, तो रिटर्न
B.
Returns False if dictionary is empty
यदि डिक्शनरी खाली है तो गलत है
C.
Returns True if all keys of the dictionary are true
यदि डिक्शनरी की सभी keys सही हैं, तो सही
D.
Method any() doesn’t exist for dictionary
मैथड किसी भी () शब्दकोश के लिए मौजूद नहीं है
Question No# :
23
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# :
24
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('cd'.partition('cd'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('cd'.partition('cd'))</span></pre>
A.
(‘cd’)
(‘cd’)
B.
(”)
(”)
C.
(‘cd’, ”, ”)
(‘cd’, ”, ”)
D.
(”, ‘cd’, ”)
(”, ‘cd’, ”)
Question No# :
25
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# :
26
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# :
27
out of 50
<p>What will be the output of the following Python code?</p><pre>points = [[1, 2], [3, 1.5], [0.5, 0.5]]<br>points.sort()<br>print(points)</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">points = [[1, 2], [3, 1.5], [0.5, 0.5]]<br>points.sort()<br>print(points)</pre>
A.
[[1, 2], [3, 1.5], [0.5, 0.5]]
[[1, 2], [3, 1.5], [0.5, 0.5]]
B.
[[3, 1.5], [1, 2], [0.5, 0.5]]
[[3, 1.5], [1, 2], [0.5, 0.5]]
C.
[[0.5, 0.5], [1, 2], [3, 1.5]]
[[0.5, 0.5], [1, 2], [3, 1.5]]
D.
[[0.5, 0.5], [3, 1.5], [1, 2]]
[[0.5, 0.5], [3, 1.5], [1, 2]]
Question No# :
28
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('a B'.isalpha())</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('a B'.isalpha())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
29
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("abcdef".find("cd"))</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("abcdef".find("cd"))</span></pre>
A.
True
सही
B.
2
2
C.
3
3
D.
None of the mentioned
उल्लेखित कोई नहीं
Question No# :
30
out of 50
Which one of the following is immutable data type ?
निम्नलिखित में से कौन सा इम्म्यूटेबल डेटा टाइप है?
A.
list
लिस्ट
B.
set
सेट
C.
tuple
टपल
D.
dictionary
डिक्शनरी
Question No# :
31
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# :
32
out of 50
<p>What will be the output of the following Python code?</p><pre>d1={"abc":5,"def":6,"ghi":7}<br>print(d1[0])</pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d1={"abc":5,"def":6,"ghi":7}<br>print(d1[0])</pre>
A.
abc
abc
B.
5
5
C.
{"abc":5}
{"abc":5}
D.
error
error
Question No# :
33
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('abcdefcdgh'.partition('cd'))</span></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdefcdgh'.partition('cd'))</span></pre>
A.
(‘ab’, ‘cd’, ‘ef’, ‘cd’, ‘gh’)
(‘ab’, ‘cd’, ‘ef’, ‘cd’, ‘gh’)
B.
(‘ab’, ‘cd’, ‘efcdgh’)
(‘ab’, ‘cd’, ‘efcdgh’)
C.
(‘abcdef’, ‘cd’, ‘gh’)
(‘abcdef’, ‘cd’, ‘gh’)
D.
error
एरर
Question No# :
34
out of 50
Which statement is correct??
कौन सा कथन सही है??
A.
. List is mutable & Tuple is immutable
. List is mutable & Tuple is immutable
B.
List is immutable & Tuple is mutable
List is immutable & Tuple is mutable
C.
Both are mutable
Both are mutable
D.
Both are immutable
Both are immutable
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
To remove string “hello” from list1, we use which command?
लिस्ट1 से स्ट्रिंग "हैलो" को रिमूव करने के लिए, हम किस कमांड का यूज़ करते हैं?
A.
list1.remove(“hello”)
लिस्ट1.रिमूव("हैलो")
B.
list1.remove(hello)
लिस्ट1.रिमूव(हैलो)
C.
list1.removeAll(“hello”)
लिस्ट1.रिमूव ऑल("हैलो")
D.
list1.removeOne(“hello”)
लिस्ट1.रिमूववन("हैलो")
Question No# :
37
out of 50
Python allows ____ operations on string data type .
पायथन स्ट्रिंग डेटा प्रकार पर ____ऑपरेशन की अनुमति देता है।
A.
Concatenation
कॉनकैटनेशन
B.
Membership
मेंबरशिप
C.
Slicing
स्लाईसिंग
D.
All of the above
उपर्युक्त सभी
Question No# :
38
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# :
39
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# :
40
out of 50
split( ) function returns the _____ of words delimited by the specified substring.
स्प्लिट() फंक्शन निर्दिष्ट सबस्ट्रिंग द्वारा सीमांकित शब्दों का ____ देता है।
A.
List
लिस्ट
B.
Tuple
टपल
C.
Dictionary
डिक्शनरी
D.
None
कोई नहीं
Question No# :
41
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# :
42
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# :
43
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('abef'.partition('cd'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abef'.partition('cd'))</span></pre>
A.
(‘abef’)
(‘abef’)
B.
(‘abef’, ‘cd’, ”)
(‘abef’, ‘cd’, ”)
C.
(‘abef’, ”, ”)
(‘abef’, ”, ”)
D.
error
एरर
Question No# :
44
out of 50
What will happen if you try to access a key that doesn’t exist in a dictionary?
यदि आप किसी ऐसी की तक पहुंचने का प्रयास करते हैं जो ड़िक्शनरी में मौजूद नहीं है तो क्या होगा?
A.
Returns None
Returns None
B.
Throws a KeyError
Throws a KeyError
C.
Creates a new key with a default value
Creates a new key with a default value
D.
Crashes the program
प्रोग्राम को क्रैश कर देता है
Question No# :
45
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# :
46
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# :
47
out of 50
Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
मान लीजिए कि list1 = [0.5 * x for x in range(0, 4)], list1 है:
A.
[0, 1, 2, 3]
[0, 1, 2, 3]
B.
[0, 1, 2, 3, 4]
[0, 1, 2, 3, 4]
C.
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5]
D.
[0.0, 0.5, 1.0, 1.5, 2.0]
[0.0, 0.5, 1.0, 1.5, 2.0]
Question No# :
48
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# :
49
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# :
50
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 ()
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