page-banner
Chapter-6 (Part-2) Python Function
Q1.
सिस्टम मेमोरी के किस भाग में फ़ंक्शन कॉल के पैरामीटर और लोकल वेरिएबल्स को संग्रहीत करता है?<break-line><break-line>Which part of the memory does the system store the parameter and local variables of a function call?
A. heap
B. stack
C. Uninitialized data segment
D. None of these
View Answer
Q2.
आउटपुट क्या होगा<break-line><break-line>What is the output?<pre><code>def calc(x): r = 2 * x ** 2 return r print(calc(5))</code></pre>
A. Error
B. 50
C. 100
D. 20
View Answer
Q3.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following Python code?<pre><code>def printMax(a, b): if a > b: print(a, 'is maximum') elif a == b: print(a, 'is equal to', b) else: print(b, 'is maximum') printMax(3, 4)</code></pre>
A. 3
B. 4
C. 4 is maximum
D. None of these
View Answer
Q4.
निम्नलिखित कोड का आउटपुट क्या होगा?<break-line><break-line>What is the output of the following code?<pre><code>x = 50 def func(x): x = 2 func(x) print('x is now', x)</code></pre>
A. x is now 50
B. x is now 2
C. x is now 100
D. Error
View Answer
Q5.
निम्नलिखित कोड का आउटपुट क्या होगा?<break-line><break-line>What is the output of the following code?<pre><code>def disp(*arg): for i in arg: print(i) disp(name="Rajat", age="20")</code></pre>
A. TypeError
B. Rajat 20
C. Name age
D. None of these
View Answer