page-banner
Python M3-R5.1 MCQs SET-5
Q16.
निम्नलिखित में से कौन सा पायथन में एक कीवर्ड नहीं है?<break-line><break-line>Which of the following is not a keyword in python?
A. return
B. in
C. False
D. false
View Answer
Q17.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following Python code ?<break-line><break-line><pre><code>x = 50 def func(x): print('x is', x) x = 2 print('Changed local x to', x) func(x)</code></pre>
A. print('x is now', x)x is 50 Changed local x to 2x is now 50
B. x is 50 Changed local x to 2x is now 2
C. x is 50 Changed local x to 2x is now 100
D. None of the mentioned
View Answer
Q18.
कथन 3 के लिए उत्तर चुनें।<break-line><break-line>Choose the answer for statement 3.<break-line><break-line><pre><code>import ___________ # statement 1 rec = [] while True: rn = int(input("Enter")) nm = input("Enter") temp = [rn, nm] rec.append(temp) ch = input("Enter choice (Y/N)") if ch.upper() == "N": break f = open("stud.dat", "____________") # statement 2 __________.dump(rec, f) # statement 3 f.close() # statement 4</code></pre>
A. unpickle
B. pickle
C. write
D. None of the above
View Answer
Q19.
निम्नलिखित छद्म कोड का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following pseudo-code ?<break-line><break-line><pre><code>Integer a Set a = 5 do print a - 2 a = a - 1 while (a != 0) end while</code></pre>
A. 5 3 0
B. 3 0
C. infinite loop
D. None of these
View Answer
Q20.
रवि ने open( ) फ़ंक्शन का उपयोग करके python में एक फ़ाइल खोली लेकिन मोड निर्दिष्ट करना भूल गया। फाइल किस मोड में खुलेगी?<break-line><break-line>Ravi opened a file in python using open() function but forgot to specify the mode. In which mode the file will open?
A. write
B. append
C. read
D. Both read and write
View Answer