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 Statement will create a Tuple:
निम्नलिखित में से कौन सा स्टेट्मेंट एक टपल क्रिएट करेगा:
A.
t1=1,2,4
t1=1,2,4
B.
t1=(1,)
t1=(1,)
C.
t1=tuple(“123”)
t1=tuple(“123”)
D.
All of these
ये सब
Question No# :
02
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# :
03
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# :
04
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# :
05
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# :
06
out of 50
What is the output of the following code? print(len("Python\nProgramming"))
निम्नलिखित कोड का आउटपुट क्या है? print(len("Python\nProgramming"))
A.
19
19
B.
18
18
C.
17
17
D.
Error
एरर
Question No# :
07
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">a={1:"A",2:"B",3:"C"}<br></span><span style="font-size: 14px;">for i,j in a.items(): <br></span><span style="font-size: 14px;"> print(i,j,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:"A",2:"B",3:"C"}<br></span><span style="font-size: 14px;">for i,j in a.items(): <br></span><span style="font-size: 14px;"> print(i,j,end=" ")</span></pre>
A.
1 A 2 B 3 C
1 A 2 B 3 C
B.
1 2 3
1 2 3
C.
A B C
A B C
D.
1:”A” 2:”B” 3:”C”
1:”A” 2:”B” 3:”C”
Question No# :
08
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# :
09
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# :
10
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# :
11
out of 50
<p>What will be the output of the following Python code snippet?</p><pre>for i in [1, 2, 3, 4][::-1]:<br> print (i)</pre><div><br></div>
<p>निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">for i in [1, 2, 3, 4][::-1]:<br> print (i)</pre>
A.
1 2 3 4
1 2 3 4
B.
4 3 2 1
4 3 2 1
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
12
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# :
13
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# :
14
out of 50
<p>What will be the output of the following?</p><pre>print(sum(1,2,3))</pre>
<p>निम्नलिखित का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print(sum(1,2,3))</pre>
A.
error
error
B.
6
6
C.
1
1
D.
3
3
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 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# :
17
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# :
18
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# :
19
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# :
20
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# :
21
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("abc DEF".capitalize())</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("abc DEF".capitalize())</span></pre>
A.
abc def
abc def
B.
ABC DEF
ABC DEF
C.
Abc def
Abc def
D.
Abc Def
Abc Def
Question No# :
22
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# :
23
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# :
24
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# :
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
When we open file in append mode the file pointer is at the of the file?
जब हम फाइल को एपेंड मोड में खोलते हैं तो फाइल पॉइंटर फाइल के ____ पर होता है?
A.
anywhere in between the file
फ़ाइल के बीच में कही भी
B.
End
अंत
C.
beginning
आरम्भ में
D.
second line of the file
फ़ाइल की दूसरी पंक्ति
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;">print('abc'.islower())</span></pre>
<p>निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abc'.islower())</span></pre>
A.
True
True
B.
False
False
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
28
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# :
29
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# :
30
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# :
31
out of 50
<p>What will be the output of the following Python code snippet?</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[1] = 1 a['1'] = 2 a[1.0]=4 count = 0 for i in a: count += a[i] print(count) print(a)</span></pre>
<p>निम्नलिखित Ptyhon कोड स्निपेट का आउटपुट क्या होगा?</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[1] = 1 a['1'] = 2 a[1.0]=4 count = 0 for i in a: count += a[i] print(count) print(a)</pre>
A.
An exception is thrown
एक एक्सेप्शन फेंक दिया जाता है
B.
3
3
C.
6
6
D.
2
2
Question No# :
32
out of 50
Suppose list1 is [1, 5, 9], what is sum(list1)?
मान लीजिए कि लिस्ट1 है [1, 5, 9],sum (लिस्ट1) क्या है?
A.
1
1
B.
9
9
C.
15
15
D.
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(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# :
34
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# :
35
out of 50
<p>What will the output of following code?</p><pre><span style="font-size: 14px;">a={1,2,3}<br></span><span style="font-size: 14px;">b={1,2,3,4}<br></span><span style="font-size: 14px;">c=a.issuperset(b)<br></span><span style="font-size: 14px;">print(c)</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}<br></span><span style="font-size: 14px;">b={1,2,3,4}<br></span><span style="font-size: 14px;">c=a.issuperset(b)<br></span><span style="font-size: 14px;">print(c)</span></pre>
A.
False
गलत
B.
True
सही
C.
Syntax error for issuperset() method
Issuperset () विधि के लिए सिंटैक्स एरर
D.
Error, no method called issuperset() exists
एरर, कोई मैथड जिसे ssuperset कहा जाता है () मौजूद है
Question No# :
36
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# :
37
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# :
38
out of 50
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?
मान लीजिए सूची है। [3, 4, 5, 20, 5, 25, 1, 3], listExample.pop() के बाद लिस्ट1 क्या है।
A.
[3, 4, 5, 20, 5, 25, 1]
[3, 4, 5, 20, 5, 25, 1]
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# :
39
out of 50
What is the data type of (1)?
(1) का डेटा प्रकार क्या है?
A.
Tuple
टपल
B.
Integer
इन्टिजर
C.
List
लिस्ट
D.
Both tuple and integer
टपल और इन्टिजर दोनों
Question No# :
40
out of 50
<p><span style="font-size: 14px;">What is the output of the following code?</span><br></p><pre>list1=[2, 33, 222, 14, 25]<br>print(list1[ : -1 ])</pre>
<p>मान लीजिए कि लिस्ट 1 है [2, 33, 222, 14, 25], लिस्ट 1 [ : - 1 ] क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">list1=[2, 33, 222, 14, 25]<br>print(list1[ : -1 ])</pre>
A.
[2, 33, 222, 14]
[2, 33, 222, 14]
B.
Error
एरर
C.
25
25
D.
[25, 14, 222, 33, 2]
[25, 14, 222, 33, 2]
Question No# :
41
out of 50
What is the output when we execute list(“hello”)?
जब हम लिस्ट ("हैलो") एक्सक्यूट करते हैं तो आउटपुट क्या है?
A.
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
B.
[‘hello’]
[‘hello’]
C.
[‘llo’]
[‘llo’]
D.
[‘olleh’]
[‘olleh’]
Question No# :
42
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# :
43
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# :
44
out of 50
Suppose a list with name arr, contains 5 elements. You can get the 2nd element from the list using:
मान लीजिए कि arr नाम वाली एक सूची में 5 एलिमेन्ट हैं। आप सूची से दूसरा एलिमेन्ट प्राप्त कर सकते हैं:
A.
arr[-2]
arr[-2]
B.
arr[2]
arr[2]
C.
arr[-1]
arr[-1]
D.
arr[1]
arr[1]
Question No# :
45
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# :
46
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# :
47
out of 50
Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?
मान लीजिए d= {"जॉन": 40, "पीटर": 45}। ड़िक्शनरी में एंट्रीज के नंबर्स प्राप्त करने के लिए हम किस कमांड का यूज़ करते हैं?
A.
d.size()
d.साइज़()
B.
len(d)
लेन (d)
C.
size(d)
साइज़(d)
D.
d.len()
d.लेन()
Question No# :
48
out of 50
Which keyword is used to remove individual items or the entire dictionary itself.
अलग-अलग आइटम या पूरी डिक्शनरी को हटाने के लिए किस कीवर्ड का उपयोग किया जाता है।
A.
del
del
B.
remove
remove
C.
removeAll
removeAll
D.
None of these
इनमें से कोई नहीं
Question No# :
49
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# :
50
out of 50
<p>What will be the output of the following Python code snippet?</p><pre>test = {1:'A', 2:'B', 3:'C'}<br>del test[1]<br>test[1] = 'D'<br>del test[2]<br>print(len(test))</pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">test = {1:'A', 2:'B', 3:'C'}<br>del test[1]<br>test[1] = 'D'<br>del test[2]<br>print(len(test))</pre>
A.
0
0
B.
2
2
C.
Error as the key-value pair of 1:’A’ is already deleted
Error as the key-value pair of 1:’A’ is already deleted
D.
1
1
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