page-banner
Chapter-5 (Part-1) Sequence Data Types
Q6.
निम्नलिखित कोड का आउटपुट क्या है?<break-line><break-line>What is the output of following code?<pre><code>a1 = {1:"A",2:"B",3:"C"} b1 = {4:"D",5:"E"} b1.update(a1) print(b1)</code></pre>
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.
निम्नलिखित कोड का आउटपुट क्या है?<break-line><break-line>What is the output of following code?<pre><code>A=[[1,2,3],[4,5,6],[7,8,9]] print(A[1][:])</code></pre>
A. [1, 2, 3]
B. [4, 5, 6]
C. [2, 5, 8]
D. None of these
View Answer
Q8.
निम्नलिखित कोड का आउटपुट क्या है?<break-line><break-line>What is the output of the following?<pre><code>t = (2, 3, 4, 3.5, 5, 6) print(sum(t) + t.count(2))</code></pre>
A. 24
B. 23.5
C. 24.5
D. 25.5
View Answer
Q9.
"john" को डिलीट करने के लिए कौन सी कमांड उपयोग करेंगे?<break-line><break-line>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.
पायथन में एक सूची को दूसरे में कैसे कॉपी करें?<break-line><break-line>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