File Handling Revision- Text file Handling Quiz 1

Quiz
•
Computers
•
12th Grade
•
Hard
Subhashini S
Used 122+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
To open a file poem.txt for reading, the correct syntax is___________
file=open('poem.txt','r')
file=open(file='poem.txt','r')
fileopen=('poem.txt','r')
f=('poem.txt','w')
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
To read the entire contents of a text file as a string from a file object fobj , the correct syntax is _____________
fobj.read()
fobj.read(all)
fobj.readlines()
fobj.readline(18)
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
To read 18 characters from the file object fobj , the correct syntax is ____________.
fobj.readlines(18)
fobj.readchar(18)
fobj.read(18)
fobj.readline(18)
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Mention the data type of variable check in the following statements?
a. check=f.read()
b. check=f.readline()
c. check=f.readlines()
a. str b. str c. list
a. list b. str c. list
a. str b. list c. list
a. str b. list c. str
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
'w+' mode will _________________
first write the file by deleting the contents of the existing file, if the file exists.
first read the file and then write the contents by deleting its contents, if the file exists.
first write and then read the file contents, by deleting the contents of the file if the file exists.
first read and then write the contents, by deleting the contents of the file if the file exists.
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
_____ function will break the link of file object and file on the disk
open()
read()
write()
close()
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
_____ function without any argument removes leading and trailing whitespaces.
strip()
lstrip()
rstrip()
trim()
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
AP CSP - Unit 2 Review

Quiz
•
9th - 12th Grade
19 questions
ICT_IGCSE_Chapter11_FileManagment

Quiz
•
9th - 12th Grade
20 questions
Exploring File Operations in Python

Quiz
•
12th Grade
20 questions
Text File Handling Set -1

Quiz
•
12th Grade
15 questions
File System Exercise

Quiz
•
12th Grade - University
15 questions
Quiz tentang Jenis File Audio

Quiz
•
12th Grade
20 questions
PowerPoint and some Google Slides

Quiz
•
9th - 12th Grade
18 questions
Digital Media - Graphic Design Terms/Photoshop/File Format

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade