page-banner
Chapter-5 (Part-1) Sequence Data Types
Q1.
निम्नलिखित में से कौन-सा अपरिवर्तनीय डेटा प्रकार है?

Which one of the following is immutable data type?
A. list
B. set
C. tuple
D. dict
View Answer
Q2.
किस प्रकार का डेटा है:

What type of data is:
arr = [(1, 1), (2, 2), (3, 3)]
A. List of tuples
B. Tuples of lists
C. Array of tuples
D. Invalid type
View Answer
Q3.
किस डेटा प्रकार में इंडेक्सिंग मान्य नहीं है?

In which data type, indexing is not valid?
A. list
B. dictionary
C. string
D. none of the above
View Answer
Q4.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of following code?
a = set('abc')
b = set('cd')
print(a ^ b)
A. {a,b,c,d}
B. {'c', 'b', 'a', 'd'}
C. {'b', 'a', 'd'}
D. None of these
View Answer
Q5.
टपल के 5वें एलिमेंट को 'Hello' कैसे सेट करें?

How can you set the 5th element of a tuple to 'Hello'?
A. arr[4] = 'Hello'
B. arr(4) = 'Hello'
C. Elements of tuple cannot be changed
D. arr[5] = 'Hello'
View Answer
Q6.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of following code?
a1 = {1:"A",2:"B",3:"C"}
b1 = {4:"D",5:"E"}
b1.update(a1)
print(b1)
A. {4: 'D', 5: 'E', 1: 'A', 2: 'B', 3: 'C'}
B. {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
C. {4: 'D', 5: 'E'}
D. None of these
View Answer
Q7.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of following code?
A=[[1,2,3],[4,5,6],[7,8,9]]
print(A[1][:])
A. [1, 2, 3]
B. [4, 5, 6]
C. [2, 5, 8]
D. None of these
View Answer
Q8.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of the following?
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
View Answer
Q9.
"john" को डिलीट करने के लिए कौन सी कमांड उपयोग करेंगे?

To delete the entry for “john” from dictionary d = {"john":40, "peter":45}, use:
A. d.delete("john":40)
B. d.delete("john")
C. del d["john"]
D. del d("john":40)
View Answer
Q10.
पायथन में एक सूची को दूसरे में कैसे कॉपी करें?

How to copy one list to another in Python?
A. a1 = list(a2)
B. a1 = a2.copy()
C. a1 = a2[:]
D. All of these
View Answer
Q11.
निम्नलिखित में से कौन सा एक सही है?

Which one of the following is correct?
A. Dictionary can have two same keys with different values
B. Dictionary can have two same values with different keys
C. Dictionary can have two same keys or same values but cannot have two same key-value pair
D. Dictionary can neither have two same keys nor two same values
View Answer
Q12.
सूची से दूसरा एलिमेंट प्राप्त करने का सही तरीका क्या है?

How to get the 2nd element from a list arr with 5 elements?
A. arr[-2]
B. arr[2]
C. arr[-1]
D. arr[1]
View Answer
Q13.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
ms = ('A', 'D', 'H', 'U', 'N', 'I', 'C')
print(ms[1:4])
A. ('D', 'H', 'U')
B. ('A', 'D', 'H', 'U', 'N', 'I', 'C')
C. ('D', 'H', 'U', 'N', 'I', 'C')
D. None of these
View Answer
Q14.
निम्न में से कौन सा कथन एक डिक्शनरी बनाता है?

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
View Answer
Q15.
निम्न में से कौन सा एरर देगा?

Which of the following would give an error?
A. list1 = []
B. list1 = [] * 3
C. list1 = [2, 8, 7]
D. None of the above
View Answer
Q16.
q.pop(1) के बाद सूची में क्या आइटम होंगे?

What will be the items of list q after q.pop(1) if
q = [3, 4, 5, 20, 5, 25, 1, 3]
A. [3, 4, 5, 20, 5, 25, 1, 3]
B. [1, 3, 3, 4, 5, 5, 20, 25]
C. [3, 5, 20, 5, 25, 1, 3]
D. [1, 3, 4, 5, 20, 5, 25]
View Answer
Q17.
निम्नलिखित में से किस डेटा प्रकार में डुप्लीकेट आइटम की अनुमति नहीं है?

In which of the following data types are duplicate items not allowed?
A. list
B. dictionary
C. set
D. None of these
View Answer
Q18.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
a = set('dcma')
b = set('mlpc')
print(a ^ b)
A. {'d', 'c', 'm', 'a', 'm', 'l', 'p', 'c'}
B. {'m', 'l', 'p', 'c'}
C. {'d', 'c', 'm', 'a'}
D. None of these
View Answer
Q19.
निम्नलिखित कथन का आउटपुट क्या है?

What is the output of the following statement?
print((2, 4) + (1, 5))
A. (2, 4), (4, 5)
B. (3, 9)
C. (2, 4, 1, 5)
D. Invalid Syntax
View Answer
Q20.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
dict = {"Joey": 1, "Rachel": 2}
dict.update({"Phoebe": 2})
print(dict)
A. {"Joey":1,"Rachel":2,"Phoebe":2}
B. {"Joey":1,"Rachel":2}
C. {"Joey":1,"Phoebe":2}
D. Error
View Answer
Q21.
निम्नलिखित पाइथन कोड का आउटपुट क्या होगा?

What will be the output of the following Python code?
t1 = (1, 2, 4, 3)
t2 = (1, 2, 3, 4)
t1 < t2
A. True
B. False
C. error in code
D. (1, 2, 4, 3)
View Answer
Q22.
निम्नलिखित में से कौन सा सेट बनाने के लिए सही सिंटैक्स नहीं है?

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}
View Answer
Q23.
टपल में मानों तक पहुँचने के लिए स्क्वायर ब्रैकेट का उपयोग करें।

To access values in tuple, use square brackets for slicing along with index.
A. True
B. False
C. can’t say
D. None of these
View Answer
Q24.
अलग-अलग टपल एलिमेंट को हटाना संभव है।

Removing individual tuple elements is possible.
A. True
B. False
C. can’t say
D. None of these
View Answer
Q25.
दाईं ओर से नकारात्मक गिनती

Negative count from the right.
A. L[-2]
B. L[-1]
C. L[-end]
D. L[-10]
View Answer
Q26.
लिस्ट को टपल में बदलें।

Convert a list into tuple.
A. tuple(seq)
B. list(tuple)
C. tuple * list
D. None of these
View Answer
Q27.
स्पष्ट रूप से एक संपूर्ण टपल हटा दें।

Explicitly remove an entire tuple.
A. del
B. remove
C. pop
D. None of these
View Answer
Q28.
टपल्स स्क्वायर ब्रैकेट की बजाय __________ का उपयोग करते हैं।

Tuples use __________ instead of square brackets.
A. parenthesis
B. reference
C. function
D. None of these
View Answer
Q29.
निम्नलिखित में से कौन सा फंक्शन डिक्शनरी से सभी कीज प्राप्त करता है?

Which function of dictionary gets all the keys?
A. getkeys()
B. key()
C. keys()
D. None of these
View Answer
Q30.
कौन सा कथन सही है?

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.
View Answer
Q31.
values() डिक्शनरी का एक फंक्शन है जो डिक्शनरी से सभी वैल्यू प्राप्त करता है।

values() is a function of dictionary that gets all values.
A. True
B. False
C. can’t say
D. None of these
View Answer
Q32.
frozenset(s) फ़ंक्शन टपल्स के सीक्वेंस को डिक्शनरी में परिवर्तित करता है।

frozenset(s) function converts a sequence of tuples to dictionary.
A. True
B. False
C. can’t say
D. None of these
View Answer
Q33.
पायथन में एक फ़ंक्शन जो एक स्ट्रिंग को लिस्ट में बदलता है

A function converts a string to a list in Python.
A. list()
B. filter()
C. tuple()
D. None of these
View Answer
Q34.
निम्न में से कौन डिक्शनरी में key= “tiger” के लिए key-value pair को हटाएगा?

Which of the following will delete key-value pair for key = “tiger” in dictionary?
dic = {
  "lion" : "wild",
  "tiger" : "wild",
  "cat" : "domestic",
  "dog" : "domestic"
}
A. del dic["tiger"]
B. dic["tiger"].delete()
C. delete(dic.["tiger"])
D. del(dic.["tiger"])
View Answer
Q35.
नीचे दी गई ऑब्जेक्ट किस डेटा टाइप की है?

What data type is the object below?
L = [1, 23, 'hello', 1]
A. List
B. Dictionary
C. Tuple
D. Array
View Answer
Q36.
list1 में एक तत्व (5) जोड़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Which function is used to add an element (5) in the list1?
A. list1.sum(5)
B. list1.add(5)
C. list1.append(5)
D. list1.addelement(5)
View Answer
Q37.
की वैल्यू पेअर होता है .............. में.

Key-value pair is found in __________.
A. list
B. set
C. tuple
D. dictionary
View Answer
Q38.
__________ ऑपरेटर दिए गए आइटम्स की संख्या के लिए एक सूची को दोहराता है

__________ operator repeats a list for the given number of items.
A. pow
B. *
C. repeat
D. None of these
View Answer
Q39.
निम्नलिखित पायथन कोड का आउटपुट क्या है?

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
View Answer
Q40.
जब हम list("hello") निष्पादित करते हैं तो आउटपुट क्या होता है?

What is the output when we execute list("hello")?
A. ['h', 'e', 'l', 'l', 'o']
B. [' hello']
C. ['llo']
D. ['olleh']
View Answer
Q41.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
a = {1: "A", 2: "B", 3: "C"}
b = {4: "D", 5: "E"}
a.update(b)
print(a)
A. {1: 'A', 2: 'B', 3: 'C'}
B. {1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
C. {4: 'D', 5: 'E'}
D. Error in Code
View Answer
Q42.
निम्नलिखित पाइथन कोड का परिणाम क्या है?

What will be the output of the following Python code?
len(["hello", 2, 4, 6])
A. Error
B. 6
C. 4
D. 3
View Answer
Q43.
पायथन में सूचियों के संबंध में निम्नलिखित में से कौन सा सही है?

Which of the following is True regarding lists in Python?
A. Lists are immutable.
B. Size of the lists must be specified before its initialization
C. Elements of lists are stored in contagious memory location.
D. size(list1) command is used to find the size of lists.
View Answer
Q44.
लिस्ट 1 [4, 2, 2, 4, 5, 2, 1, 0] है, कौन सा स्लाइसिंग ऑपरेशन सही है?

Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], which of the following is correct syntax for slicing?
A. print(list1[2:])
B. print(list1[:2])
C. print(list1[:-2])
D. all of the mentioned
View Answer
Q45.
निम्नलिखित पाइथन कोड का परिणाम क्या है?

What will be the output of the following Python code?
d1 = { "abc" : 5,  "def" : 6,  "ghi" : 7 }
print(d1[0])
A. abc
B. 5
C. { "abc" : 5 }
D. Error
View Answer
Q46.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
M = ['b' * x for x in range(4)]
print(M)
A. ['', 'b', 'bb', 'bbb']
B. ['b', 'bb', 'bbb', 'bbbb']
C. ['b', 'bb', 'bbb']
D. None of these
View Answer
Q47.
निम्नलिखित पाइथन कोड का परिणाम क्या है?

What is the output of the following Python code?
a = set('abc')
b = set('cdef')
print(a & b)
A. {'c'}
B. {'a', 'b', 'c', 'd', 'e', 'f'}
C. {c}
D. None of these
View Answer
Q48.
निम्नलिखित पाइथन कोड का परिणाम क्या है?

What is the output of the following Python code?
list1 = [1, 3]
list2 = list1
list1[0] = 4
print(list2)
A. [1, 4]
B. [1, 3, 4]
C. [4, 3]
D. [1, 3]
View Answer
Q49.
निम्नलिखित स्निपेट का परिणाम क्या है?

What is the output of the following snippet?
num = (4, 7, 19, 2, 89, 45, 72, 22)
y = sorted(num)
z = [x for x in y if x % 2 != 0]
print(z)
A. [7, 19, 45, 89]
B. [2, 4, 22, 72]
C. [4, 7, 19, 2, 89, 45, 72, 22]
D. [2, 4, 7, 19, 22, 45, 72, 89]
View Answer
Q50.
निम्नलिखित स्निपेट का परिणाम क्या है?

What is the output of the following code snippet?
print([i.lower() for i in 'HELLO'])
A. hello
B. ['h', 'e', 'l', 'l', 'o']
C. hel
D. HELLO
View Answer