O Level Online Exam
Menu mobile
Home
MCQ Topic Wise
IT TOOLS AND NETWORK BASICS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Online Mock Test
IT TOOLS AND NETWORK BASICS
New
WEB DESIGNING AND PUBLISHING
New
PYTHON PROGRAMMING
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Previous Year Papers
Practical Exam Papers
Videos
MCQ : FILE PROCESSING IN PYTHON For NIELIT O Level Exam
FILE PROCESSING IN PYTHON For NIELIT O Level Exam
00:00:00
English
Hindi
Question No# :
01
out of 50
Report Bug
Bookmark
What is unpickling?
अनपिकलिंग क्या है
A.
It is used for object serialization
It is used for object serialization
B.
It is used for object de-serialization
It is used for object de-serialization
C.
change the string value to number
change the string value to number
D.
extract the list element in simple variable
extract the list element in simple variable
Question No# :
02
out of 50
Report Bug
Bookmark
Which statement will move file pointer 10 bytes backward from current position.
कौन सा स्टेटमेंट फाइल पॉइंटर को वर्तमान स्थिति से 10 बाइट पीछे ले जाएगा ।
A.
f.seek(-10, 0)
f.seek(-10, 0)
B.
f.seek(10,0)
f.seek(10,0)
C.
f.seek(-10, 1)
f.seek(-10, 1)
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
03
out of 50
Report Bug
Bookmark
Which of the function take takes two arguments?
कौन सा फंक्शन को दो आर्गूमेंट की जरूरत पड़ेगी
A.
dump()
dump()
B.
load()
load()
C.
Both A and B
Both A and B
D.
None of the above
None of the above
Question No# :
04
out of 50
Report Bug
Bookmark
What is full form of CSV?
सीएसवी का फुल फॉर्म क्या है?
A.
Comma Space Value
Comma Space Value
B.
Comma Separated Value
Comma Separated Value
C.
Common spaced Value
Common spaced Value
D.
Compact Structure View
Compact Structure View
Question No# :
05
out of 50
Report Bug
Bookmark
in python which function is used to read CSV file
पायथन में CSV फ़ाइल को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
A.
csv.reader(file)
csv.reader(file)
B.
csv.read(file)
csv.read(file)
C.
csv.readcsv(file)
csv.readcsv(file)
D.
csv.readcsvdata(file)
csv.readcsvdata(file)
Question No# :
06
out of 50
Report Bug
Bookmark
The syntax of seek() is: file_object.seek(offset [, reference_point]) What does the reference_point indicate?
seek () का सिंटैक्स है: file_object.seek(offset [, Reference_point]) रेफरेंस_पॉइंट क्या दर्शाता है?
A.
reference_point indicates the current position of the file object
reference_point indicates the current position of the file object
B.
reference_point indicates the starting position of the file object
reference_point indicates the starting position of the file object
C.
reference_point indicates the ending position of the file object
reference_point indicates the ending position of the file object
D.
None of the above
None of the above
Question No# :
07
out of 50
Report Bug
Bookmark
Which of the following is the correct way to write multiple lines to a file in Python?
पायथन में किसी फ़ाइल में एक से अधिक पंक्तियाँ लिखने का सही तरीका निम्नलिखित में से कौन सा है?
A.
Use multiple write() statements.
Use multiple write() statements.
B.
Use writelines() method.
Use writelines() method.
C.
Use writeLine() method.
Use writeLine() method.
D.
Use append() method.
Use append() method.
Question No# :
08
out of 50
Report Bug
Bookmark
Which function changes the current file position?
कौन सा फ़ंक्शन फ़ाइल की वर्तमान स्थिति को बदलता है?
A.
seek()
seek()
B.
move()
move()
C.
tell()
tell()
D.
shift()
shift()
Question No# :
09
out of 50
Report Bug
Bookmark
When we open file in append mode the file pointer is at the ______ of the file.
जब हम अपेंड मोड में फाइल खोलते हैं तो फाइल पॉइंटर फाइल के _____ पर होता है।
A.
end
अंतिम में
B.
beginning
शुरूआत में
C.
anywhere in between the file
फाइल में कहीं भी
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
10
out of 50
Report Bug
Bookmark
Which of the following declarations is incorrect?
निम्नलिखित में से कौन सी डेक्लरेशंस गलत है?
A.
_x=2
_x=2
B.
x=3
x=3
C.
_xyz_=5
_xyz_=5
D.
None of these
इनमे से कोई नहीं
Question No# :
11
out of 50
Report Bug
Bookmark
The syntax used to rename a file :
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:
A.
os.rename(existing_name, new_name)
os.rename(existing_name, new_name)
B.
fq.name = ‘new_name.txt’
fq.name = ‘new_name.txt’
C.
os.rename(fp, new_name)
os.rename(fp, new_name)
D.
os.set_name(existing_name, new_name)
os.set_name(existing_name, new_name)
Question No# :
12
out of 50
Report Bug
Bookmark
which of the following will read entire content of file (file object 'f')?
निम्नलिखित में से कौन फ़ाइल (file object 'f') की संपूर्ण सामग्री को पढ़ेगा ?
A.
f.reads()
f.reads()
B.
f.read()
f.read()
C.
f.read(all)
f.read(all)
D.
f.read( *)
f.read( *)
Question No# :
13
out of 50
Report Bug
Bookmark
In which format Binary file contains information?
बाइनरी फ़ाइल में सूचना किस प्रारूप में होती है?
A.
Quick response code
क्विक रिस्पांस कोड
B.
Same format in which the data is held in memory
उसी प्रारूप में जिसमे डेट को मेमोरी में रखा जाता है
C.
ASCII format
एएससीआईआई प्रारूप
D.
Unicode format
यूनिकोड फॉर्मेट
Question No# :
14
out of 50
Report Bug
Bookmark
Which method is used to read the entire content of a file as a string in Python?
पायथन में फ़ाइल के पूरे डाटा को स्ट्रिंग के रूप में पढ़ने के लिए किस फंक्शन का उपयोग किया जाता है?
A.
read()
read()
B.
readline()
readline()
C.
readlines()
readlines()
D.
load()
load()
Question No# :
15
out of 50
Report Bug
Bookmark
How can you write data to a file in Python?
आप पायथन में किसी फ़ाइल में डेटा कैसे लिख सकते हैं?
A.
write()
write()
B.
append()
append()
C.
add()
add()
D.
insert()
insert()
Question No# :
16
out of 50
Report Bug
Bookmark
Which function returns the strings?
कौन सा फंक्शन स्ट्रिंग्स लौटाता है?
A.
readlines()
readlines()
B.
read()
read()
C.
Both of the above
Both of the above
D.
None of the above
None of the above
Question No# :
17
out of 50
Report Bug
Bookmark
Which of the following is not a valid mode to open a file?
निम्नलिखित में से कौन सा फ़ाइल खोलने के लिए वैध मोड नहीं है?
A.
ab
ab
B.
rw
rw
C.
r+
r+
D.
w+
w+
Question No# :
18
out of 50
Report Bug
Bookmark
Which function is used to read all the characters from file?
फ़ाइल से सभी वर्णों को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
A.
readall()
readall()
B.
read()
read()
C.
readcharacter()
readcharacter()
D.
readchar()
readchar()
Question No# :
19
out of 50
Report Bug
Bookmark
What is mean by 'rb' mode when working with binary file in python
पायथन में बाइनरी फ़ाइल के साथ काम करते समय 'rb' मोड का क्या अर्थ है?
A.
read binary
read binary
B.
write binary
write binary
C.
append binary
append binary
D.
read write
read write
Question No# :
20
out of 50
Report Bug
Bookmark
A Function used for writing data in the binary format :
बाइनरी फॉर्मेट में डेटा लिखने के लिए उपयोग किया जाने वाला एक फंक्शन:
A.
write
write
B.
output
output
C.
send
send
D.
dump
dump
Question No# :
21
out of 50
Report Bug
Bookmark
Which denotes file binary mode?
फ़ाइल बाइनरी मोड को कौन दर्शाता है?
A.
r
r
B.
rb
rb
C.
w
w
D.
r+
r+
Question No# :
22
out of 50
Report Bug
Bookmark
If we open a file in write mode and file does not exists, which of the error will generate?
यदि हम एक फाइल को राइट मोड में खोलते हैं और फाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?
A.
File Found Error
File Found Error
B.
File Not Exist Error
File Not Exist Error
C.
File Not Found Error
File Not Found Error
D.
None of these
None of these
Question No# :
23
out of 50
Report Bug
Bookmark
In which format python file considered
पाइथन फ़ाइल को किस प्रारूप में माना जाता है
A.
giga bytes
giga bytes
B.
mega bytes
mega bytes
C.
byte
byte
D.
bits
bits
Question No# :
24
out of 50
Report Bug
Bookmark
Which of the following error is returned when we try to open a file in write mode which does not exist?
जब हम किसी ऐसी फ़ाइल को राइट मोड में खोलने की प्रयास करते हैं जो मौजूद नहीं है तो निम्न में से कौन सी एरर दिखाई देती है
A.
File Found Error
File Found Error
B.
File Not Exist Error
File Not Exist Error
C.
File Not Found Error
File Not Found Error
D.
None of the above
उपरोक्त में से कोई
Question No# :
25
out of 50
Report Bug
Bookmark
Which of the following mode will refer to binary data?
निम्न में से कौन सा मोड बाइनरी डेटा को संदर्भित करेगा?
A.
r
r
B.
w
w
C.
+
+
D.
b
b
Question No# :
26
out of 50
Report Bug
Bookmark
Which is the function to read the remaining lines of the file from a file object infile?
फ़ाइल ऑब्जेक्ट infile से फ़ाइल की शेष पंक्तियों को पढ़ने के लिए कौन सा फंक्शन है?
A.
infile.read(2)
infile.read(2)
B.
infile.read()
infile.read()
C.
infile.readlines()
infile.readlines()
D.
infile.readline()
infile.readline()
Question No# :
27
out of 50
Report Bug
Bookmark
Which module is commonly used for command line arguments?
कमांड लाइन आर्गुमेंट्स के लिए आमतौर पर किस मॉड्यूल का उपयोग किया जाता है?
A.
random
random
B.
sys
sys
C.
math
math
D.
os
os
Question No# :
28
out of 50
Report Bug
Bookmark
What is the current syntax of remove a file?
remove() फाइल का वर्तमान सिंटैक्स क्या है?
A.
remove((), file_name))
remove((), file_name))
B.
remove (new_file_name, current_file_name,)
remove (new_file_name, current_file_name,)
C.
remove (file_name)
remove (file_name)
D.
All of the above
उपर्युक्त सभी
Question No# :
29
out of 50
Report Bug
Bookmark
Which of the following is used to define a block of code in Python language ?
पायथन लैंग्वेज में कोड के ब्लॉक को परिभाषित करने के लिए निम्न में से किसका प्रयोग किया जाता है?
A.
try
try
B.
Brackets
ब्रैकेट्स
C.
Indentation
इंडेंटेशन
D.
Catch
कैच
Question No# :
30
out of 50
Report Bug
Bookmark
Which mode creates a file if it does not exist and appends data?
कौन सा मोड किसी फाइल के मौजूद न होने पर उसे बनाता है और उसमें डेटा जोड़ता है?
A.
r
r
B.
w
w
C.
a
a
D.
r+
r+
Question No# :
31
out of 50
Report Bug
Bookmark
Which function of pickle module is used to write data on binary file
बाइनरी फ़ाइल पर डेटा लिखने के लिए अचार मॉड्यूल का कौन सा फ़ंक्शन प्रयोग किया जाता है
A.
dump()
dump()
B.
write()
write()
C.
writeBinary()
writeBinary()
D.
load()
load()
Question No# :
32
out of 50
Report Bug
Bookmark
What does readlines() method return ?
रीडलाइन () मेथड क्या रिटर्न करता है?
A.
Dictionary
शब्दकोश
B.
String
स्ट्रिंग
C.
Tuple
टपल
D.
List
लिस्ट
Question No# :
33
out of 50
Report Bug
Bookmark
What happens if file opened in write mode already exists?
यदि राइट मोड में खोली गई फाइल पहले से मौजूद हो तो क्या होगा?
A.
Data is appended
Data is appended
B.
Error occurs
Error occurs
C.
Old content is erased
Old content is erased
D.
Nothing happens
Nothing happens
Question No# :
34
out of 50
Report Bug
Bookmark
f.read(5) will read________from a file (file object 'f')
f.read(5) एक फ़ाइल से________ पढ़ेगा (file object 'f')
A.
5 characters
5 वर्ण
B.
5 words
5 शब्द
C.
5 lines
5 पंक्तिया
D.
None of the above
उपरोक्त में से कोई नहीं
Question No# :
35
out of 50
Report Bug
Bookmark
What is the pickling?
पिकलिंग क्या है?
A.
It is used for object serialization
इसका उपयोग ऑब्जेक्ट सीरिअलाइजेशन के लिए किया जाता है
B.
It is used for object deserialization
इसका उपयोग ऑब्जेक्ट डीसीरिअलाइजेशन के लिए किया जाता है
C.
All of the mentioned
उल्लिखित सभी
D.
None of the mentioned
उल्लिखित कोई नहीं
Question No# :
36
out of 50
Report Bug
Bookmark
Which one is not the attribute of a file ?
इनमें से कौन एक फाइल की विशेषता नहीं है ?
A.
softspace
softspace
B.
mode
mode
C.
closed
closed
D.
rename
rename
Question No# :
37
out of 50
Report Bug
Bookmark
Work of tell() method in file processing is
फाइल प्रोसेसिंग में tell() फंक्शन का कार्य है
A.
Tells you the current position within the file.
Tells you the current position within the file.
B.
Tells the size of file you read
Tells the size of file you read
C.
Tells the start position of the file.
Tells the start position of the file.
D.
Tells the end position of the file.
Tells the end position of the file.
Question No# :
38
out of 50
Report Bug
Bookmark
Which mode creates a new file if the file does not exist?
यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फाइल बनाता है?
A.
write mode
राइट मोड
B.
read mode
रीड मोड
C.
append mode
अपेण्ड मोड
D.
Both (A) And (C)
(A) और (C) दोनों
Question No# :
39
out of 50
Report Bug
Bookmark
How can you close a file in Python after processing?
प्रसंस्करण के बाद आप पायथन में किसी फ़ाइल को कैसे बंद कर सकते हैं?
A.
close_file()
close_file()
B.
file_close()
file_close()
C.
close()
close()
D.
end_file()
end_file()
Question No# :
40
out of 50
Report Bug
Bookmark
Which of the following statements is used to check if a file exists in Python?
निम्नलिखित में से किस फंक्शन का उपयोग यह जांचने के लिए किया जाता है कि कोई फ़ाइल पायथन में मौजूद है या नहीं?
A.
file_exists()
file_exists()
B.
exists_file()
exists_file()
C.
os.path.exists()
os.path.exists()
D.
check_file()
check_file()
Question No# :
41
out of 50
Report Bug
Bookmark
Hierarchy in a pseudo-code can be shown by:
सूड़ो-कोड में पदानुक्रम को द्वारा दिखाया जा सकता है|
A.
Curly Braces
कर्ली ब्रेसेस
B.
Round Brackets
राउंड ब्रेसेस
C.
Indentation
आइंडेंटेशन
D.
Semicolon
सेमीकोलन
Question No# :
42
out of 50
Report Bug
Bookmark
What is the Full form of EOL?
EOL का फुल फॉर्म क्या है?
A.
End of List
End of List
B.
End of Line
End of Line
C.
End of Loop
End of Loop
D.
End of Language
End of Language
Question No# :
43
out of 50
Report Bug
Bookmark
Which of the following functions is used to open a file in Python?
पायथन में फ़ाइल खोलने के लिए निम्नलिखित में से किस फ़ंक्शन का उपयोग किया जाता है?
A.
open_file()
open_file()
B.
file_open()
file_open()
C.
open()
open()
D.
read_file()
read_file()
Question No# :
44
out of 50
Report Bug
Bookmark
Which statement will return one line from a file (file object is f) ?
कौन सा स्टेटमेंट फ़ाइल (file object is 'f) से एक पंक्ति प्रस्तुत करेगा |
A.
f.readlines()
f.readlines()
B.
f.readline()
f.readline()
C.
f.read()
f.read()
D.
f.line()
f.line()
Question No# :
45
out of 50
Report Bug
Bookmark
What does EOF stand for?
EOF का पूरा नाम क्या है?
A.
End Of Folder
End Of Folder
B.
Exit Open File
Exit Open File
C.
End Of File
End Of File
D.
Error On File
Error On File
Question No# :
46
out of 50
Report Bug
Bookmark
What does tell() return?
tell() फ़ंक्शन क्या लौटाता है?
A.
File size
File size
B.
Current file pointer position
Current file pointer position
C.
Number of lines
Number of lines
D.
Number of characters remaining
Number of characters remaining
Question No# :
47
out of 50
Report Bug
Bookmark
Which statement will open file data.txt in append mode?
कौन सा स्टेटमेंट data.txt फाइल को एपेंड मोड में खोलेगा?
A.
f = open("data.txt", "a")
f = open("data.txt", "a")
B.
f = Open("data.txt", "ab")
f = Open("data.txt", "ab")
C.
f= new("data.txt", "a")
f= new("data.txt", "a")
D.
open("data.txt", "a")
open("data.txt", "a")
Question No# :
48
out of 50
Report Bug
Bookmark
The function which reads one line from standards input and returns it as a string (removing the trailing newline)
वह फंक्शन जो स्टैण्डर्ड इनपुट से एक पंक्ति रीड करता है और इसे स्ट्रिंग के रूप में लौटाता है (ट्रेलिंग न्यूलाइन को हटाते हुए)
A.
raw_input
रॉ_इनपुट
B.
input
इनपुट
C.
eval
ईवल
D.
accept
एक्सेप्ट
Question No# :
49
out of 50
Report Bug
Bookmark
to use load() function for working with binary file in python which module is require
पायथन में बाइनरी फ़ाइल के साथ काम करने के लिए load() फ़ंक्शन का उपयोग करने के लिए किस मॉड्यूल की आवश्यकता है
A.
pickle
pickle
B.
binary
binary
C.
unpickle
unpickle
D.
fstream
fstream
Question No# :
50
out of 50
Report Bug
Bookmark
which is a correct way to open a file in python
पायथन में फ़ाइल खोलने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
A.
file_object=open(file_name,mode)
file_object=open(file_name,mode)
B.
open(file_object,file_name,mode)
open(file_object,file_name,mode)
C.
file_open(file_object,file_name,mode)
file_open(file_object,file_name,mode)
D.
file_object=file_open(file_name,mode)
file_object=file_open(file_name,mode)
Latest Current Affairs 2026
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Online MBA 2 years
Online MCA
Online BCA
Best Website and Software Company in Allahabad