page-banner
Python M3-R5.1 MCQs SET-11
Q1.
पायथन में एक फ़ंक्शन कैसे घोषित किया जाता है?

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.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following ?
import sys
sys.stdout.write('Welcome\n')
sys.stdout.write('All\n')
A. WelcomeAll
B. Welcome All
C. Compilation Error
D. Runtime Error
View Answer
Q3.
फ़ाइल खोलने के लिए निम्न में से कौन सा सही मोड नहीं है?

Which of the following is not a correct mode to open a file?
A. ab
B. rw
C. a+
D. r+
View Answer
Q4.
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:

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.
यदि हम एक फाइल को राइट मोड में खोलते हैं और फाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?

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

Create Account