page-banner
Python M3-R5.1 MCQs SET-11
Q1.
पायथन में एक फ़ंक्शन कैसे घोषित किया जाता है?<break-line><break-line>How is a function declared in Python ?
A. def function function_name():
B. declare function function_name():
C. def function_name():
D. declare function_name():
View Answer
Q2.
निम्नलिखित का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following ?<pre><code>import sys sys.stdout.write('Welcome\n') sys.stdout.write('All\n')</code></pre>
A. WelcomeAll
B. Welcome All
C. Compilation Error
D. Runtime Error
View Answer
Q3.
फ़ाइल खोलने के लिए निम्न में से कौन सा सही मोड नहीं है?<break-line><break-line>Which of the following is not a correct mode to open a file?
A. ab
B. rw
C. a+
D. r+
View Answer
Q4.
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:<break-line><break-line>The syntax used to rename a file :
A. os.rename(existing_name, new_name)
B. fp.name = 'new_name.txt'
C. os.rename(fp, new_name)
D. os.set_name(existing_name, new_name)
View Answer
Q5.
यदि हम एक फाइल को राइट मोड में खोलते हैं और फाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?<break-line><break-line>If we open a file in write mode and file does not exists, which of the error will generate ?
A. File Found Error
B. File Not Exist Error
C. File Not Found Error
D. None of these
View Answer