Syllabus
O Level
M1 R5: Information Technology Tools and Network Basics
Introduction to Computers
Office Automation Tools
Internet and Web Technologies
Networking Fundamentals
M2 R5: Web Designing and Publishing
HTML
CSS
Javascript
Web Hosting And Publishing
M3 R5: Programming and Problem Solving through Python
Introduction to Programming
Python Programming
Data Structures in Python
File Processing in Python
M4 R5: Internet of Things (IoT) and Its Applications
Introduction to IoT
IoT Architecture
IoT Applications
IoT Security and Challenges | Soft Skills
Courses
Under Graduate Courses
BA
BCA
B.COM
Post Graduate Courses
MCA
MBA
M.COM
MA
M.SC.(MATHS)
MSW
Institutional Courses
DCA
ADCA
DFA
DOAP
TALLY PRIME
JAVA
PYTHON
CCA
C Languages
Job Oriented Courses
Digital Marketing
Full Stack Development
Data Science
Cybersecurity and Ethical Hacking
Blockchain Development
Cloud Computing
Artificial Intelligence (AI) and Machine Learning
Government Courses
CCC
O LEVEL
A LEVEL
Mock Test
M1 R5: Information Technology Tools and Network Basics
M2 R5: Web Designing and Publishing
M3 R5: Programming and Problem Solving through Python
M4 R5: Internet of Things (IoT) and Its Applications
Old Papers
2025
New!
2024
New!
2023
New!
2022
New!
2021
New!
2020
New!
2019
New!
2018
New!
2017
New!
2016
New!
2015
New!
2014
New!
2013
New!
2012
New!
2011
New!
Assignments
HTML
New!
CSS
New!
Javascript
New!
Python
New!
Log in
Sign Up
O Level Papers!
M3 R5: Programming and Problem Solving through Python
File Processing in Python
Set 1
25
See Explanation !
1
Which is the function to read the remaining lines of the file from a file object infile?
फ़ाइल ऑब्जेक्ट infile से फ़ाइल की शेष पंक्तियों को पढ़ने के लिए कौन सा फंक्शन है?
infile.read(2)
infile.read()
infile.readlines()
infile.readline()
Next Question
25
See Explanation !
2
Which of the function take takes two arguments?
कौन सा फंक्शन को दो आर्गूमेंट की जरूरत पड़ेगी
dump()
load()
Both A and B
None of the above
Previous Question
Next Question
25
See Explanation !
3
Which is mean by 'a' mode when working with text file.
टेक्स्ट फ़ाइल के साथ काम करते समय a मोड से इसका मतलब है।
Append File
Write File
Read File
Read and Write both
Previous Question
Next Question
25
See Explanation !
4
to use load() function for working with binary file in python which module is require
पायथन में बाइनरी फ़ाइल के साथ काम करने के लिए load() फ़ंक्शन का उपयोग करने के लिए किस मॉड्यूल की आवश्यकता है
pickle
binary
unpickle
fstream
Previous Question
Next Question
25
See Explanation !
5
Which function of pickle module is used to write data on binary file
बाइनरी फ़ाइल पर डेटा लिखने के लिए अचार मॉड्यूल का कौन सा फ़ंक्शन प्रयोग किया जाता है
dump()
write()
writeBinary()
load()
Previous Question
Next Question
25
See Explanation !
6
What is mean by 'rb' mode when working with binary file in python
पायथन में बाइनरी फ़ाइल के साथ काम करते समय 'आरबी' मोड का क्या मतलब है?
read binary
write binary
append binary
read write
Previous Question
Next Question
25
See Explanation !
7
If we open a file in write mode and file does not exists, which of the error will generate?
यदि हम एक फाइल को राइट मोड में खोलते हैं और फाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?
File Found Error
File Not Exist Error
File Not Found Error
None of these
Previous Question
Next Question
25
See Explanation !
8
Which of the following is an invalid mode?
निम्न में से कौन सा अमान्य मोड है?
a
ar+
r+
w
Previous Question
Next Question
25
See Explanation !
9
Which of the following is not a correct mode to open a file ?
फ़ाइल खोलने के लिए निम्न में से कौन सा सही मोड नहीं है?
ab
rw
a+
r+
Previous Question
Next Question
25
See Explanation !
10
Which function returns the strings?
कौन सा फंक्शन स्ट्रिंग्स लौटाता है?
readlines()
read()
Both of the above
None of the above
Previous Question
Next Question
25
See Explanation !
11
What will be the output of the following code? f=open("demo.txt","r") print(f.tell())
MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 01 HOURS 03 MINUTES 46 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE
1
2
-1
0
Previous Question
Next Question
25
See Explanation !
12
The syntax used to rename a file :
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:
os.rename(existing_name, new_name)
fq.name = ‘new_name.txt’
os.rename(fp, new_name)
os.set_name(existing_name, new_name)
Previous Question
Next Question
25
See Explanation !
13
A Function used for writing data in the binary format :
बाइनरी फॉर्मेट में डेटा लिखने के लिए उपयोग किया जाने वाला एक फंक्शन:
write
output
send
dump
Previous Question
Next Question
25
See Explanation !
14
The syntax of seek() is: file_object.seek(offset [, reference_point]) What does the reference_point indicate?
seek () का सिंटैक्स है: file_object.seek(offset [, Reference_point]) रेफरेंस_पॉइंट क्या दर्शाता है?
reference_point indicates the current position of the file object
reference_point indicates the starting position of the file object
reference_point indicates the ending position of the file object
None of the above
Previous Question
Next Question
25
See Explanation !
15
What will be the output of the following code ? f=open("demo.txt","w+") f.write("Welcome to python") f.seek(5) a=f.read(5) print(a)
निम्नलिखित कोड का आउटपुट क्या होगा? f=open("demo.txt","w+") f.write("Welcome to python") f.seek(5) a=f.read(5) print(a)
Welco
me to
Welcome to Python
e to
Previous Question
Next Question
25
See Explanation !
16
Which function is used to read all the characters from file?
फ़ाइल से सभी वर्णों को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?
readall()
read()
readcharacter()
readchar()
Previous Question
Next Question
25
See Explanation !
17
Which one is not the attribute of a file ?
इनमें से कौन एक फाइल की विशेषता नहीं है ?
softspace
mode
closed
rename
Previous Question
Next Question
25
See Explanation !
18
Which of the following error is returned when we try to open a file in write mode which does not exist?
जब हम किसी ऐसी फ़ाइल को राइट मोड में खोलने की प्रयास करते हैं जो मौजूद नहीं है तो निम्न में से कौन सी एरर दिखाई देती है
File Found Error
File Not Exist Error
File Not Found Error
None of the above
Previous Question
Next Question
25
See Explanation !
19
What does readlines() method return ?
Readlines() विधि क्या लौटाती है?
Dictionary
String
Tuple
List
Previous Question
Next Question
25
See Explanation !
20
Which of the following declarations is incorrect?
निम्नलिखित में से कौन सी डेक्लरेशंस गलत है?
_x=2
x=3
_xyz_=5
None of these
Previous Question
Next Question
25
See Explanation !
21
Which of the following error is returned by the given code ? f = open("test.txt","w") f.write(345)
निम्नलिखित में से कौन सी त्रुटि दिए गए कोड द्वारा लौटाई जाती है? f = open("test.txt","w") f.write(345)
Syntax Error
Type Error
String Error
Run Time Error
Previous Question
Next Question
25
See Explanation !
22
Which statement will return one line from a file (file object is f) ?
कौन सा स्टेटमेंट फ़ाइल (file object is 'f) से एक पंक्ति प्रस्तुत करेगा |
f.readlines()
f.readline()
f.read()
f.line()
Previous Question
Next Question
25
See Explanation !
23
f.read(5) will read________from a file (file object 'f')
f.read(5) एक फ़ाइल से________ पढ़ेगा (file object 'f')
5 characters
5 words
5 lines
None of the above
Previous Question
Next Question
25
See Explanation !
24
Which mode creates a new file if the file does not exist?
यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फाइल बनाता है?
write mode
read mode
append mode
Both (A) And (B)
Previous Question
Next Question
25
See Explanation !
25
which of the following will read entire content of file (file object 'f')?
निम्नलिखित में से कौन फ़ाइल (file object 'f') की संपूर्ण सामग्री को पढ़ेगा ?
f.reads()
f.read()
f.read(all)
f.read( *)
Previous Question