page-banner
Python M3-R5.1 MCQs SET-15
Q1.
निम्न में से कौनसा Python tuple है ?<break-line><break-line>Which of the following is a Python tuple?
A. [1, 2, 3]
B. (1, 2, 3)
C. {1, 2, 3}
D. {}
View Answer
Q2.
नीचे दिए गए कोड स्निपेट में var का डेटा टाइप क्या होगा?<break-line><break-line>What will be the datatype of the var in the below code snippet?<pre><code>var = 10 print(type(var)) var = "Hello" print(type(var))</code></pre>
A. Str and int
B. int and int
C. str and str
D. int and str
View Answer
Q3.
इनमें से कौन कोर डेटा टाइप नहीं है?<break-line><break-line>Which of these is not a core data type?
A. Lists
B. Dictionary
C. Tuples
D. Class
View Answer
Q4.
पायथन में एक कोड ब्लॉक कैसे इंगित किया जाता है?<break-line><break-line>How is a code block indicated in Python?
A. Brackets
B. Indentation
C. Key
D. None of the above
View Answer
Q5.
निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following code snippet?<pre><code>a = [1,2,3,4,5,6,7,8,9] a[::2] = 10,20,30,40,50,60 print(a)</code></pre>
A. ValueError: attempt to assign sequence of size 6 to extended slice of size 5
B. [10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
C. [1, 2, 10, 20, 30, 40, 50, 60]
D. [1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
View Answer