page-banner
Python M3-R5.1 MCQs SET-2
Q21.
निम्नलिखित कोड स्निपेट का आउटपुट क्या है?<break-line><break-line>What is the output of the following code snippet?<break-line><break-line><pre><code>print([i.lower() for i in "HELLO"])</code></pre>
A. hello
B. hel
C. ['h', 'e', 'l', 'l', 'o']
D. HELLO
View Answer
Q22.
निम्नलिखित का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following?<break-line><break-line><pre><code>Y = [2, 5J, 6] Y.sort()</code></pre>
A. [2,6,5J]
B. [5J,2,6]
C. Error
D. [6,5J,2]
View Answer
Q23.
निम्नलिखित कोड का परिणाम क्या है?<break-line><break-line>What is the output of the following code?<break-line><break-line><pre><code>import numpy as np a = np.array([1,2,3,5,8]) b = np.array([0,3,4,2,1]) c = a + b c = c * a print(c[2])</code></pre>
A. 10
B. 21
C. 12
D. 28
View Answer
Q24.
एक ___________ स्टेटमेंट का उपयोग तब किया जाता है जब किसी स्टेटमेंट की वाक्यात्मक रूप से आवश्यकता होती है लेकिन आप नहीं चाहते कि कोई कोड निष्पादित हो।<break-line><break-line>___________statement is used when a statement is required syntactically but you do not want any code to execute.
A. break
B. pass
C. continue
D. none of these
View Answer
Q25.
दिए गए कोड द्वारा निम्न में से कौन सी त्रुटि लौटाई जाती है?<break-line><break-line>Which of the following error is returned by the given code?<break-line><break-line><pre><code>f = open("test.txt" , "w") >>> f.write(345)</code></pre>
A. Syntax Error
B. Type Error
C. String Error
D. Run Time Error
View Answer