Chapter 5 Sequence Data Type MCQ
Chapter 5 Sequence Data Type MCQ
Chapter [5]
Sequence
Data Type
LESSION 5 OF 9
Contact Us
JOIN US ON for Free Course +91-9027902171
Q1. डिक्शनरी का कौन सा फ़ंक्शन सभी कीज़ को डिक्शनरी से प्राप्त करता है?
Which of the following function of dictionary gets all the keys from the
dictionary?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q2. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
a = {3, 4, 5}
a.update([1, 2, 3])
print(a)
(A) {2, 3}
(B) Error, duplicate item present in list
(C) Error, no method called intersection_update for set data type
(D) {1, 4, 5}
Contact Us
JOIN US ON for Free Course +91-9027902171
Q4. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
a = {1, 2, 3}
print({x*2 for x in a | {4, 5}})
(A) {2, 4, 6}
(B) Error, set comprehensions aren't allowed
(C) {8, 2, 10, 4, 6}
(D) {8, 10}
Contact Us
JOIN US ON for Free Course +91-9027902171
Q5. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
m = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
n = [m[i][2-i] for i in range(len(m))]
print(n)
(A) [1, 5, 9]
(B) [3, 5, 7]
(C) [3, 5, 7, 9]
(D) [3, 5, 7, 8]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q6. डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा?
What will be the output of the following statements?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q7. डनम्नलिखित का आउटपुट क्या होगा?
What is the output of the following?
(A) 0 1 2
(B) a b c
(C) 0 a 1 b 2 c
(D) None of the mentioned
Contact Us
JOIN US ON for Free Course +91-9027902171
Q8. डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा?
What will be the output of the following statements?
x = [25, 'Today', 53, 'Sunday', 15]
x.reverse()
print(x)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q9. डनम्नलिखित में कौन सी कमा़ंि लिस्ट बनाता है?
Which of the following commands will create a list?
(A) list1 = list()
(B) list1 = []
(C) list1 = list([1, 2, 3])
(D) All of the above
Contact Us
JOIN US ON for Free Course +91-9027902171
Q10. डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा?
What will be the output of the following statements?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q12. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
l = [10, 20, 30, 40, 50]
r = [x//10 for x in l]
print(r)
(A) [1, 2, 3, 4, 5]
(B) [10, 20, 30, 40, 50]
(C) [2, 4, 6, 8, 10]
(D) [0, 1, 2, 3, 4]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q13. नीचे दिया गया ऑब्जेक्ट डकस प्रकार का िेटा है?
What data type is the object below?
L = [1, 23, 'hello', 1]
(A) List
(B) Dictionary
(C) Tuple
(D) Array
Contact Us
JOIN US ON for Free Course +91-9027902171
Q14. कौन सा कथन सही है?
Which statement is correct?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q15. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
a = frozenset([5, 6, 7])
a.add(5)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q16. What will be the output of the following statements?
डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
x = [5, 4, 3, 2, 1]
x.reverse()
print(x)
(A) [0, 1, 2, 3, 4, 5]
(B) [0, 5, 4, 3, 2, 1]
(C) [5, 4, 3, 2, 1, 0]
(D) [1, 2, 3, 4, 5]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q17. What will be the output after the following statements?
डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q18. What will be the output after the following statements?
डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
(A) n
(B) mnop
(C) m n o p
(D) {'m', 'n', 'o', 'p'}
Contact Us
JOIN US ON for Free Course +91-9027902171
Q19. What will be the output after the following statements?
डनम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा ?
m = [25, 34, 70, 63]
n = str(m[1]) + str(m[2])
print(n)
(A) 2534
(B) 95
(C) 104
(D) 3470
Contact Us
JOIN US ON for Free Course +91-9027902171
Q20. What will be the output of the following Python code?
डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
points = [[1, 2], [3, 1.5], [0.5, 0.5]]
points.sort()
print(points)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q21. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
(What will be the output of the following Python code?)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q22. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
(What will be the output of the following Python code?)
l = [x for x in range(10) if x % 2 == 0]
print(l)
(A) [1, 3, 5, 7, 9]
(B) [2, 4, 6, 8, 10]
(C) [0, 2, 4, 6, 8]
(D) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q23. डनम्नलिखित प्रोग्राम का आउटपुट क्या है?
(What is the output of the following program?)
print("Hello World"[::-1])
(A) dlroWolleH
(B) Hello Worl
(C) d
(D) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q24. एक स्ट्ऱंग s="Welcome" में डनम्नलिखित में से कौन सा कोि गित है?
(Given a string s="Welcome", which of the following code is incorrect?)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q25. अगर wd="Hello World" है तो डनम्नलिखित में से कौन सा कथन स्ट्ऱंग ऑब्जेक्ट के
अ़ं ततम पा़ंच कैरेक्टर को प्रिलशि त करेगा?
(If wd="Hello World", then which of the following statements will display
the last five characters of the string object?)
(A) wd[4:]
(B) wd[:4]
(C) wd[-5:]
(D) wd[:-4]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q26. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
(What will be the output of the following Python code?)
places = ['Bangalore', 'Mumbai', 'Delhi']
places1 = places
places2 = places[:]
places1[1] = "Pune"
places2[2] = "Hyderabad"
print(places)
(A) ['da', 'ea', 'fa', 'db', 'eb', 'fb', 'dc', 'ec', 'fc']
(B) [['ad', 'bd', 'cd'], ['ae', 'be', 'ce'], ['af', 'bf', 'cf']]
(C) [['da', 'db', 'dc'], ['ea', 'eb', 'ec'], ['fa', 'fb', 'fc']]
(D) ['ad', 'ae', 'af', 'bd', 'be', 'bf', 'cd', 'ce', 'cf']
Contact Us
JOIN US ON for Free Course +91-9027902171
Q28. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
(What will be the output of the following Python code?)
[x-1 for x in [1, 2, 3]]
(A) Incorrect
(B) [1/x for x in [(1, 2, 3)]]
(C) [1/x for x in (1, 2, 3)]
(D) error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q29. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
l = [1, 2, 3, 4, 5]
l = [x & 1 for x in l]
print(l)
(A.) [1, 1, 1, 1, 1]
(B.) [1, 0, 1, 0, 1]
(C.) [1, 0, 0, 0, 0]
(D.) [0, 1, 0, 1, 0]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q30. मान िीजिए डक list1 [3, 4, 5, 20, 5] है, list1.index(5) क्या है?
Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)?
(A.) 0
(B.) 1
(C.) 4
(D.) 2
Contact Us
JOIN US ON for Free Course +91-9027902171
Q31. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
t1 = (1, 2, 4, 3)
t2 = (1, 2, 3, 4)
print(t1 < t2)
(A.) True
(B.) False
(C.) Error in code
(D.) (1, 2, 4, 3)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q32. डनम्नलिखित में से कौन सा सेट बनाने के लिए सही जसिं टक्स
ै नहीं है?
Which of the following is not the correct syntax for creating a set?
(A.) set([[1,2],[3,4]])
(B.) set([1,2,2,3,4])
(C.) set((1,2,3,4))
(D.) {1,2,3,4}
Contact Us
JOIN US ON for Free Course +91-9027902171
Q33. टपि में मानों तक पहुँचने के लिए, उस इ़ं िेक्स पर उपिब्ध मूल्य प्राप्त करने के लिए इ़ं िेक्स
या इ़ं िेक्स के साथ स्लाइजसिं ग के लिए स्क्वायर ब्रैकेट का उपयोग करें।
To access values in tuple, use the square brackets for slicing along with the
index or indices to obtain value available at that index.
(A.) True
(B.) False
(C.) Can't say
(D.) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q34. अिग-अिग टपि एलिमेंट को हटाना स़ंभव है।
Removing individual tuple elements is possible.
(A.) True
(B.) False
(C.) Can't say
(D.) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q35. िाईं ओर से नकारात्मक दगनती
Negative count from the right.
(A.) L[-2]
(B.) L[-1]
(C.) L[-end]
(D.) L[-10]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q36. मान िीजिए डक list1 = [3, 4, 5, 20, 5, 25, 1, 3] है, list1 को रन करने के बाि आउटपुट
क्या होगा?
Suppose list1 = [3, 4, 5, 20, 5, 25, 1, 3], what will be list1 after running the
code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q37. डनम्नलिखित पायथन कोि मान्य है?
Is the following Python code valid?
a, b, c = 1, 2, 3
print(a, b, c)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q38. डनम्नलिखित पायथन कोि मान्य है?
Is the following Python code valid?
a = 2, 3, 4, 5
print(a)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q39. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
a = (2, 3, 1, 5)
a.sort()
print(a)
(A.) (1, 2, 3, 5)
(B.) (2, 3, 1, 5)
(C.) None
(D.) Error, tuple has no attribute sort
Contact Us
JOIN US ON for Free Course +91-9027902171
Q40. डनम्नलिखित कोि का आउटपुट क्या होगा?
What will be the output of the following code?
a = ((0, 2, 3, 4)[1:-2])
print(a)
(A.) (3,)
(B.) (2,)
(C.) (1,)
(D.) (0,)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q41. लिस्ट को टपि में बििें।
Convert a list into tuple.
(a) tuple(seq)
(b) list(tuple)
(c) tuple * list
(d) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q42. स्पष्ट रूप से एक स़ंपूर्ण टपि हटा िें।
Explicitly remove an entire tuple.
(a) del
(b) remove
(c) pop
(d) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q43. टपल्स और सूजचयों के बीच अ़ं तर यह है डक टपल्स को बििा नहीं िा सकता है िबडक
सूजचयाुँ बििी िा सकती हैं और टपल्स …………… का उपयोग करते हैं, िबडक सूजचयाुँ
स्क्वायर ब्रैकेट का उपयोग करती हैं।
The difference between tuples and lists are, the tuples cannot be changed
unlike lists and tuples use ……………., whereas lists use square brackets.
(a) parenthesis
(b) reference
(c) function
(d) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q44. डनम्नलिखित में से कौन सा कथन एक डिक्शनरी बनाता है?
Which of the following statements create a dictionary?
(a) d = {}
(b) d = {"john":40, "peter":45}
(c) d = {40:"john", 45:"peter"}
(d) All of the mentioned
Contact Us
JOIN US ON for Free Course +91-9027902171
Q45. कौन सा कथन सही है?
Which statement is correct?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q46. डकसी लिस्ट में कोई मान मौिूि है या नहीं इसकी िाुँच करने का डनम्नलिखित में से कौन सा
सही तरीका है?
Which of the following is the correct way to check if a value exists in a list?
(A.) list.contains(value)
(B.) list.index(value)
(C.) list.contains(value)
(D.) value in list
Contact Us
JOIN US ON for Free Course +91-9027902171
Q47. लिस्ट पररवतणनशीि है और टपि अपररवतणनीय है?
List is mutable and Tuple is immutable?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q48. इनमें से कौन सा तबल्ट इन फ़ंक्शन नहीं है?
Which one is not a built-in function?
(A.) dictionary()
(B.) set()
(C.) tuple()
(D.) list()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q49. डकस प्रकार का िेटा है: arr=[(1,1),(2,2),(3,3)]?
What type of data is: arr=[(1,1),(2,2),(3,3)]?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q50. पायथन में टपि बनाने का डनम्नलिखित में से कौन सा सही तरीका है?
Which of the following is a correct way to create a tuple in Python?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q51. आप सूची के अ़ं त में '4' तत्व 'my_list = [1, 2, 3]' कैसे िोड़ सकते हैं?
How can you add an element '4' to the end of the list my_list = [1, 2, 3]?
(A.) my_list.append(4)
(B.) my_list.add(4)
(C.) my_list.insert(4)
(D.) my_list.extend(4)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q52. शब्दकोश student = {"name": "John", "age": 21, "course": "Math"} को िेिते
हए, आप कु़ंिी "age" से िुड़े मूल्य तक कैसे पह़ंच सकते हैं?
Given the dictionary student = {"name": "John", "age": 21, "course": "Math"},
how can you access the value associated with the key "age"?
(A.) student.get("age")
(B.) student["age"]
(C.) student.age
(D.) Both (A) and (B)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q53. पाइथन में टपि को अपररवतणनीय क्यों माना िाता है?
Why are tuples considered immutable in Python?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q54. 1 से 5 तक की स़ंख्याओ ़ं के वगों की सूची बनाने के लिए डनम्नलिखित में से कौन सी सही
सूची समझ है?
Which of the following is a correct list comprehension to create a list of
squares of numbers from 1 to 5?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q55. शब्दकोश से कु़ंिी-मूल्य िोड़ी को हटाने के लिए डनम्नलिखित में से डकस तवति का उपयोग
डकया िा सकता है?
Which of the following methods can be used to remove a key-value pair
from a dictionary?
(A.) pop()
(B.) remove()
(C.) delete()
(D.) discard()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q56. values() डिक्शनरी का एक फ़ंक्शन है िो डिक्शनरी से सभी वैल्यू प्राप्त करता है।
values() is a function of a dictionary that gets all the values from the
dictionary.
(a) True
(b) False
(c) can’t say
(d) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q57. पाइथन में frozenset(s) फ़ंक्शन है िो टपल्स के सीक्वेंस को डिक्शनरी में पररवतति त
करता है।
frozenset(s) function converts a sequence of tuples to dictionary in Python.
(a) True
(b) False
(c) can’t say
(d) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q58. पाइथन में एक फ़ंक्शन िो एक स्ट्ऱंग को एक लिस्ट में पररवतति त करता है:
A function converts a string to a list in Python.
(a) list()
(b) filter()
(c) tuple()
(d) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q59. डनम्न में से कौन शब्दकोश में key = "tiger" के लिए कु़ंिी-मूल्य िोड़ी को हटा िेगा?
Which of the following will delete the key-value pair for key="tiger" in a
dictionary?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q60. नीचे िी गई ऑब्जेक्ट डकस िेटा टाइप की है?
What data type is the object below?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q61. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
z = set('abc')
z.add('san')
z.update(set(['p', 'q']))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q62. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
{a 2 for a in range(4)}
Contact Us
JOIN US ON for Free Course +91-9027902171
Q63. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q64. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
a = {}
a['a'] = 1
a['b'] = [2, 3, 4]
print(a)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q66. list1 में एक element(5) िोड़ने के लिए डकस फ़ंक्शन का उपयोग डकया िाता है?
Which function is used to add an element (5) in list1?
(A.) list1.sum(5)
(B.) list1.add(5)
(C.) list1.append(5)
(D.) list1.addelement(5)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q67. की-वैल्यू पेअर होता है ............ में।
Key-value pair exists in ............
(A.) list
(B.) set
(C.) tuple
(D.) dictionary
Contact Us
JOIN US ON for Free Course +91-9027902171
Q68. __________ ऑपरेटर दिए गए आइटम्स की स़ंख्या के लिए एक सूची को िोहराता है।
__________ operator repeats a list for the given number of items.
(A.) pow
(B.) *
(C.) repeat
(D.) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q69. डनम्नलिखित पायथन कोि का आउटपुट क्या है?
What is the output of the following Python code?
tuple1 = (5, 1, 7, 6, 2)
tuple1.pop(2)
print(tuple1)
(A.) (5, 1, 6, 2)
(B.) (5, 1, 7, 6)
(C.) (5, 1, 7, 6, 2)
(D.) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q70. िब हम list("hello") डनष्पादित करते हैं तो आउटपुट क्या होता है?
What is the output when we execute list("hello")?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q71. What will be the output of the following Python code?
a = {}
a[2] = 1
a[1] = [2, 3, 4]
print(a[1][1])
(A) [2, 3, 4]
(B) 3
(C) 2
(D) An exception is thrown
Contact Us
JOIN US ON for Free Course +91-9027902171
Q72. What will be the output of the following Python code?
a = {'B': 5, 'A': 9, 'C': 7}
print(sorted(a))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q73. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q74. What will be the output of the following Python code?
a = dict()
a[1]
(A) An exception is thrown since the dictionary is empty
(B) ' '
(C) 1
(D) 0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q75. The data structure which is a mutable ordered sequence of elements is
called:
िेटा ्रक्चर िो एलिमेंट्स का एक म्यूटब
े ि ऑिणिण सीक्वेंस है, क्या कहिाता है?
(A) Built-in
(B) List
(C) Tuple
(D) Derived data
Contact Us
JOIN US ON for Free Course +91-9027902171
Q76. Which one of the following is an immutable data type?
डनम्नलिखित में से कौन-सा अपररवतणनीय िेटा प्रकार है?
(A) list
(B) set
(C) tuple
(D) dict
Contact Us
JOIN US ON for Free Course +91-9027902171
Q77. What type of data is the following?
arr = [(1, 1), (2, 2), (3, 3)]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q78. In which data type, indexing is not valid?
डकस िेटा प्रकार में इ़ं िेक्क्सिं ग मान्य नहीं है?
(A) list
(B) dictionary
(C) string
(D) none of the above
Contact Us
JOIN US ON for Free Course +91-9027902171
Q79. What is the output of the following code?
a = set('abc')
b = set('cd')
print(a ^ b)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q80. Suppose a tuple arr contains 10 elements. How can you set the 5th
element of the tuple to 'Hello'?
मान िीजिए एक tuple arr में 10 एलिमेंट्स हैं। आप टपि के 5वें एलिमेंट को 'Hello' से कैसे
सेट कर सकते हैं?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q81. A sequence of immutable objects is called:
अपररवतणनीय वस्तुओ ़ं का अनुक्रम क्या कहिाता है?
(A) Built in
(B) List
(C) Tuple
(D) Derived data
Contact Us
JOIN US ON for Free Course +91-9027902171
Q82. Which of the following is a compound structure?
डनम्नलिखित में से कौन एक क़ंपाउ़ं ि ्रक्चर है?
(A) Pair
(B) Triplet
(C) Single
(D) Quadrat
Contact Us
JOIN US ON for Free Course +91-9027902171
Q83. Bundling two values together into one can be considered as:
िो मानों को एक साथ िोड़ना क्या कहिाता है?
(A) Pair
(B) Triplet
(C) Single
(D) Quadrat
Contact Us
JOIN US ON for Free Course +91-9027902171
Q84. Which of the following is constructed by placing expressions within
square brackets?
डनम्नलिखित में से कौन सा वगीकन, कोष्ठकों के भीतर एक्सप्रेशन रिकर बनता है?
(A) Tuples
(B) Lists
(C) Classes
(D) Quadrats
Contact Us
JOIN US ON for Free Course +91-9027902171
Q85. What will be the output of the following Python code?
डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
l = [x for x in range(10) if x % 2 != 0]
print(l)
(A) [1, 2, 3, 4, 5, 6, 7, 8, 9]
(B) [0, 2, 4, 6, 8]
(C) [1, 3, 5, 7, 9]
(D) [1, 3, 5, 7, 9, 11]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q86. What is the output of the following code?
डनम्नलिखित कोि का आउटपुट क्या है?
a1 = {1: "A", 2: "B", 3: "C"}
b1 = {4: "D", 5: "E"}
b1.update(a1)
print(b1)
(A) [1, 2, 3]
(B) [4, 5, 6]
(C) [2, 5, 8]
(D) None of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q88. What is the output of the following code?
डनम्नलिखित कोि का आउटपुट क्या है?
t = (2, 3, 4, 3.5, 5, 6)
print(sum(t) + t.count(2))
(A) 24
(B) 23.5
(C) 24.5
(D) 25.5
Contact Us
JOIN US ON for Free Course +91-9027902171
Q89. Suppose d = {“john”: 40, “peter”: 45}, to delete the entry for “john”
what command do we use?
मान िीजिए d = {"िॉन": 40, "पीटर": 45}, "john" के ए़ं री को हटाने के लिए हम डकस कमा़ंि
का उपयोग करते हैं?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q90. How to copy one list to another in Python?
पायथन में एक सूची को िूसरे में कैसे कॉपी करें?
(A) a1 = list(a2)
(B) a1 = a2.copy()
(C) a1 = a2[:]
(D) All of these
Contact Us
JOIN US ON for Free Course +91-9027902171
Q91. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
(A.) [3, 6, 9]
(B.) [1, 4, 7]
(C.) [7, 8, 9]
(D.) [1, 2, 3]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q92. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
lst=[3,4,6,1,2]
lst[2:4]=[9,10]
print(lst)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q93. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
lst=[3,4,6,1,2]
lst[3:5]=[7,8]
print(lst)
(A.) [3, 4, 7, 8]
(B.) [3, 4, 6, 7, 8, 2]
(C.) [3, 4, 6, 7, 8,4]
(D.) [3, 4, 6, 7, 8, 1, 2]
Contact Us
JOIN US ON for Free Course +91-9027902171
Q94. डनम्नलिखित पायथन कोि का आउटपुट क्या होगा?
What will be the output of the following Python code?
a = [1, 2, 3]
b = a.append(4)
print(a)
print(b)
dict={"Joey":1, "Rachel":2}
dict.update({"Phoebe":2})
print(dict)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q98. डनम्नलिखित कोि का आउटपुट क्या है?
What is the output of the following code?
a = set('dcma')
b = set('mlpc')
print(a ^ b)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q99. डनम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following?
print(range(4))
(A.) 0,1,2,3
(B.) [0,1,2,3]
(C.) range(0, 4)
(D.) (0,1,2,3)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q100. डनम्नलिखित कोि का आउटपुट क्या है?
What is the output of the following code?
ms = ('A','D', 'H','U','N','I','C')
print(ms[1:4])
Contact Us
JOIN US ON for Free Course +91-9027902171
THaNK You!
Contact Us
JOIN US ON for Free Course +91-9027902171