page-banner
Chapter-6 (Part-1) Python Function
Q1.
निम्नलिखित पायथन प्रोग्राम का आउटपुट ज्ञात करें।<break-line><break-line>Find the output of following Python Programs.<pre><code>def gfg(x, 1=[]): for i in range(x): 1.append(i*i) print(1) gfg(2)</code></pre>
A. [3, 2, 1, 0, 1, 4]
B. [0, 1]
C. [0, 1, 0, 1, 4]
D. Error in Code
View Answer
Q2.
मान लीजिए t = (1, 2, 4, 3), निम्नलिखित में से कौन सा गलत है?<break-line><break-line>Suppose t = (1, 2, 4, 3), which of the following is incorrect?
A. print(t[3])
B. t[3] = 45
C. print(max(t))
D. print(len(t))
View Answer
Q3.
रिकर्सन के बारे में निम्नलिखित में से कौन सा कथन असत्य है?<break-line><break-line>Which of the following statements is false about recursion?
A. प्रत्येक पुनरावर्ती समारोह में आधार मामला होना चाहिए/Every recursive function must have a base case
B. यदि आधार मामले का ठीक से उल्लेख नहीं किया गया है तो अनंत पुनरावर्तन हो सकता है/Infinite recursion can occur if the base case is not properly mentioned
C. एक रिकर्सिव फ़ंक्शन कोड को समझने में आसान बनाता है/A recursive function makes the code easier to understand
D. प्रत्येक रिकर्सिव फ़ंक्शन में वापसी मान होना चाहिए/Every recursive function must have a return value
View Answer
Q4.
फ़ंक्शन ब्लॉक ………. कीवर्ड से शुरू होते हैं।<break-line><break-line>Functions blocks begin with the keyword.
A. del
B. def
C. define
D. function
View Answer
Q5.
निम्नलिखित पायथन प्रोग्राम्स का आउटपुट है …………<break-line><break-line>The output of following Python Programs is…………<pre><code>r = lambda q:q*2 s = lambda q:q*3 x = 2 x = r(x) x = s(x) x = r(x) print(x)</code></pre>
A. 24
B. 48
C. 64
D. Error in Code
View Answer