Important Notice:
|| CCC Result Nov 2025 ||
|| CCC Marksheet Aug 2025 ||
|| O Level Jul 2026 Reg. Form Last Date: 30/04/2026 ||
|| CCC Mar 2026 Exam Postponed ||
|| CCC/ O Level Exam Full Form ||
|| CCC Result Nov 2025 ||
|| CCC Marksheet Aug 2025 ||
|| O Level Jul 2026 Reg. Form Last Date: 30/04/2026 ||
|| CCC Mar 2026 Exam Postponed ||
|| CCC/ O Level Exam Full Form ||
O Level
Notes
Follow us:
OLevelNotes
Home
O Level Notes
M1-R5.1
M2-R5.1
M3-R5.1
M4-R5.1
CCC
CCC Chapter Wise Notes
CCC Chapter Wise MCQ
CCC Modal Paper
CCC Previous Paper
CCC Assignment
CCC Online Test/Real Portal
Chapter Wise MCQ
M1-R5.1
M2-R5.1
M3-R5.1
M4-R5.1
Model Paper
M1-R5.1
M2-R5.1
M3-R5.1
M4-R5.1
O Level Real Test Portal
Old Paper
M1-R5.1
M2-R5.1
M3-R5.1
M4-R5.1
Practical Paper
M1-R5.1
M2-R5.1
M3-R5.1
M4-R5.1
Assignment
M1-R5.1
M2-R5.1
M3-R5.1
M4-R5.1
Contact Us
ADCA Course
Introduction To Computer
Introduction To OS
MS Office
Tally Prime
Graphic Design
Web Design
Programming Language
Learn Typing
Typing Tutor
Typing Test
KCIT Student
Student Login
KCIT Student
M3-R5.1 — File Processing MCQ
25 Questions • M3-R5.1
20:00
← Back
1
To open a file in Python for reading?
A
open("f","w")
B
open("f","r")
C
open("f","a")
D
open("f","x")
2
"w" mode in open() does what?
A
Opens for reading
B
Opens for writing (creates/overwrites)
C
Opens for appending
D
Opens exclusively
3
"a" mode in open() does what?
A
Read only
B
Write (overwrite)
C
Append to end of file
D
Binary mode
4
f.read() reads?
A
One line
B
All lines as a list
C
Entire file content as string
D
Only first character
5
f.readlines() returns?
A
Entire file as string
B
One line at a time
C
List of all lines
D
Nothing
6
with open("file") as f: is preferred because?
A
It is shorter
B
Automatically closes file after block
C
Faster reading
D
Works only in Python 3
7
f.write("Hello") does what?
A
Reads Hello from file
B
Writes Hello to file
C
Appends Hello
D
Deletes Hello from file
8
To check if a file exists in Python, use?
A
os.fileexists()
B
os.path.exists()
C
file.check()
D
path.isfile()
9
"r+" mode opens file for?
A
Read only
B
Write only
C
Both reading and writing
D
Append only
10
To delete a file in Python?
A
file.delete()
B
os.remove()
C
del file
D
os.erase()
11
open() function is used to?
A
Close file
B
Open a file
C
Delete file
D
Rename file
12
"r" mode opens file for?
A
Writing
B
Reading
C
Append
D
Binary
13
"w" mode opens file for?
A
Reading
B
Writing (creates/overwrites)
C
Append
D
Read-write
14
"a" mode opens file for?
A
Reading
B
Writing from start
C
Appending at end
D
Binary read
15
file.read() returns?
A
One line
B
Entire file content as string
C
First word
D
File name
16
file.readline() returns?
A
All lines
B
One line at a time
C
First word
D
Last line
17
file.readlines() returns?
A
String
B
List of all lines
C
First line
D
Last line
18
file.write() does?
A
Reads data
B
Writes string to file
C
Deletes data
D
Copies file
19
file.close() is?
A
Optional
B
Important to free resources
C
Never needed
D
Only for read mode
20
with statement in file handling?
A
Opens file and auto-closes when done
B
Only opens file
C
Only reads
D
Only writes
21
"rb" mode opens file in?
A
Read text
B
Read binary
C
Write binary
D
Append binary
22
os.rename() is used to?
A
Delete file
B
Rename a file
C
Open file
D
Close file
23
os.remove() is used to?
A
Rename file
B
Delete a file
C
Open file
D
Read file
24
os.path.exists() checks?
A
File size
B
If file/directory exists
C
File type
D
File permissions
25
CSV module in Python handles?
A
Images
B
Comma-separated value files
C
Videos
D
Audio
📋 Question Navigator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Answered
Not Answered
ℹ️ Quiz Info
Total Questions:
25
Time Limit:
20 min
Subject:
M3-R5.1
Passing:
60%
Attempt all questions before submitting. You can review your answers using the navigator above.
Answered:
0
/ 25
Submit Quiz