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
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# :
02
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# :
03
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# :
04
out of 50
<p>What is the output of following code</p><pre><span style="font-size: 14px;">d = {}<br></span><span style="font-size: 14px;">d[1] = "Python"<br></span><span style="font-size: 14px;">d[2] = "Java"<br></span><span style="font-size: 14px;">print(len(d))</span></pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">d = {}<br></span><span style="font-size: 14px;">d[1] = "Python"<br></span><span style="font-size: 14px;">d[2] = "Java"<br></span><span style="font-size: 14px;">print(len(d))</span></pre>
A.
0
0
B.
1
1
C.
2
2
D.
Error
Error
Question No# :
05
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# :
06
out of 50
lstrip() method is used for :
lstrip () फंक्शन का उपयोग इसके लिए किया जाता है:
A.
delete all the trailing whitespace characters
delete all the trailing whitespace characters
B.
delete all the leading whitespace characters
delete all the leading whitespace characters
C.
delete all the leading and trailing whitespace characters
delete all the leading and trailing whitespace characters
D.
delete upper case characters
delete upper case characters
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;">print('Hello World'.istitle())</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('Hello World'.istitle())</span></pre>
A.
True
True
B.
False
False
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
08
out of 50
<p>What is the output?</p><pre><span style="font-size: 14px;">a = [1, 2, 3]<br></span><span style="font-size: 14px;">a.remove(2)<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 = [1, 2, 3]<br></span><span style="font-size: 14px;">a.remove(2)<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
[1, 2]
[1, 2]
B.
[1, 3]
[1, 3]
C.
[2, 3]
[2, 3]
D.
Error
Error
Question No# :
09
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# :
10
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# :
11
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# :
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
<p>Which of the following will delete key-value pair for key="tiger" in dictionary?</p><pre><span style="font-size: 12.6px;">dic={"lion":"'wild","tiger":"'wild",'cat":"domestic","dog":"domestic"}</span></pre>
<p>निम्न में से कौन शब्दकोश में Key-Tiger के लिए की-वैल्यू पेयार को डिलीट करेगा|</p><pre style=""><span style="font-size: 12.6px;">dic={"lion":"'wild","tiger":"'wild",'cat":"domestic","dog":"domestic"}</span><span style="font-size: 12.6px; letter-spacing: 0.14px;"></span></pre><p> </p>
A.
del dic("tiger")
del dic("tiger")
B.
dic["tiger"].delete()
dic["tiger"].delete()
C.
delete(dic.["tiger'])
delete(dic.["tiger'])
D.
del dic["tiger"]
del dic["tiger"]
Question No# :
14
out of 50
<p>what will the output of following code</p><pre><span style="font-size: 14px;">my_string="Hello,world"<br></span><span style="font-size: 14px;">print(my_string[-6:-1])</span></pre>
<p> निम्नलिखित कोड का आउटपुट क्या होगा</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">my_string="Hello,world"<br></span><span style="font-size: 14px;">print(my_string[-6:-1])</span></pre>
A.
,worl
,worl
B.
worl
worl
C.
world
world
D.
oworld
oworld
Question No# :
15
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# :
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(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# :
17
out of 50
<p>What is the output of the following code?</p><pre>a = set('dcma')<br>b = set('mlpc')<br>print(a^b)</pre><div><br></div>
<p>निम्नलिखित कोड का आउटपुट क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a = set('dcma')<br>b = set('mlpc')<br>print(a^b)</pre>
A.
{‘d’, ‘c’, ‘m’, ‘l’, ‘p’, ‘c’}
{‘d’, ‘c’, ‘m’, ‘l’, ‘p’, ‘c’}
B.
{‘m’, ‘l’, ‘p’, ‘c’}
{‘m’, ‘l’, ‘p’, ‘c’}
C.
{‘d’, ‘c’, ‘m’, ‘a’}
{‘d’, ‘c’, ‘m’, ‘a’}
D.
None of These
None of These
Question No# :
18
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# :
19
out of 50
<p>What will be the output?</p><pre><span style="font-size: 14px;">a={'a':4,'b':6,'a':7}<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={'a':4,'b':6,'a':7}<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
{'a': 5, 'b': 6,'a': 7 }
{'a': 5, 'b': 6,'a': 7 }
B.
{'a': 7, 'b': 6}
{'a': 7, 'b': 6}
C.
{'a': 5, 'b': 6 }
{'a': 5, 'b': 6 }
D.
Key Error
Key Error
Question No# :
20
out of 50
Which of the following is a Python tuple?
निम्नलिखित में से कौन एक Python tuple है?
A.
[1, 2, 3]
[1, 2, 3]
B.
(1, 2, 3)
(1, 2, 3)
C.
{1, 2, 3}
{1, 2, 3}
D.
{}
{}
Question No# :
21
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('11'.isnumeric())</span></pre><div><br></div>
<p>निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('11'.isnumeric())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
22
out of 50
Which of the following methods is used to check if a string starts with a specific prefix?
निम्नलिखित में से किस मेथड का यूज़ यह चेक करने के लिए किया जाता है कि कोई स्ट्रिंग किसी स्पेसिफ़िक प्रीफ़िक्स से स्टार्ट होती है या नहीं?
A.
startswith()
startswith()
B.
startswith_prefix()
startswith_prefix()
C.
startswithwith()
startswithwith()
D.
startswiths()
startswiths()
Question No# :
23
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# :
24
out of 50
Assume q= [3, 4, 5, 20, 5, 25, 1, 3], then what will be the items of q list after q.pop(1) ?
मान लीजिए q= [3, 4, 5, 20, 5, 25, 1, 3], तो q.pop(1) के बाद q सूची में क्या आइटम होंगे?
A.
[3, 4, 5, 20, 5, 25, 1, 3]
[3, 4, 5, 20, 5, 25, 1, 3]
B.
[1, 3, 3, 4, 5, 5, 20, 25]
[1, 3, 3, 4, 5, 5, 20, 25]
C.
[3, 5, 20, 5, 25, 1, 3]
[3, 5, 20, 5, 25, 1, 3]
D.
[1, 3, 4, 5, 20, 5, 25]
[1, 3, 4, 5, 20, 5, 25]
Question No# :
25
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# :
26
out of 50
Which of the following methods will create a copy of a list?
निम्नलिखित में से कौन सा मेथड किसी लिस्ट की एक कॉपी क्रिएट करेगी ?
A.
copy = list(original)
copy = list(original)
B.
copy = original[:]
copy = original[:]
C.
copy = original.copy()
copy = original.copy()
D.
All of the above
ऊपर के सभी
Question No# :
27
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# :
28
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# :
29
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# :
30
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# :
31
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('abcdef'.partition('cd'))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdef'.partition('cd'))</span></pre>
A.
(‘ab’, ‘ef’)
(‘ab’, ‘ef’)
B.
(‘abef’)
(‘abef’)
C.
(‘ab’, ‘cd’, ‘ef’)
(‘ab’, ‘cd’, ‘ef’)
D.
2
2
Question No# :
32
out of 50
Which of the following commands will create a list?
निम्नलिखित में से कौन सी कमांड एक लिस्ट क्रिएट करेगी ?
A.
list1 = list()
list1 = list()
B.
list1 = []
list1 = []
C.
list1 = list([1, 2, 3])
list1 = list([1, 2, 3])
D.
all of the mentioned
सभी का उल्लेख है
Question No# :
33
out of 50
Which method is used to access some part of a string or substring.
स्ट्रिंग या सबस्ट्रिंग के कुछ भाग को एक्सेस करने के लिए किस विधि का उपयोग किया जाता है।
A.
slicer
स्लाईसर
B.
Slicing
स्लाईसिंग
C.
Membership
मेंबरशिप
D.
None of these-
इनमें से कोई नहीं
Question No# :
34
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# :
35
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# :
36
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('1Rn@'.lower())</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('1Rn@'.lower())</span></pre>
A.
n
n
B.
1rn@
1rn@
C.
rn
rn
D.
r
r
Question No# :
37
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(d["john"])</span></pre><div><br></div>
<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(d["john"])</span></pre>
A.
40
40
B.
45
45
C.
“john”
“john”
D.
“peter”
“peter”
Question No# :
38
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# :
39
out of 50
What is the output when we execute list("hello")?
जब हम list ( "hello") निष्पादित करते हैं तो आउटपुट क्या है?
A.
['llo']
['llo']
B.
['hello']
['hello']
C.
['h', 'e', l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
D.
None of the above
इनमें से कोई नहीं
Question No# :
40
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# :
41
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# :
42
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# :
43
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# :
44
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(x)</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d = {0, 1, 2}<br>for x in d:<br> print(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.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
45
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# :
46
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">a.clear() <br></font><font color="#333333">print(a)</font></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</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.clear() <br></font><font color="#333333">print(a)</font></pre>
A.
None
None
B.
{ None:None, None:None, None:None}
{ None:None, None:None, None:None}
C.
{1:None, 2:None, 3:None}
{1:None, 2:None, 3:None}
D.
{ }
{ }
Question No# :
47
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# :
48
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre> <span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(list(d.keys()))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"> <span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(list(d.keys()))</span></pre>
A.
[“john”, “peter”]
[“john”, “peter”]
B.
[“john”:40, “peter”:45]
[“john”:40, “peter”:45]
C.
(“john”, “peter”)
(“john”, “peter”)
D.
(“john”:40, “peter”:45)
(“john”:40, “peter”:45)
Question No# :
49
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# :
50
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
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