
File Handling Text Files
Authored by Remya Pillai
Instructional Technology
12th Grade - University
Used 20+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of ‘r’ as prefix in the given statement? f = open(r “d:\color\flower.txt”)
To make it relative string
To make it new string
To make it raw string
To make it reverse string
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A file object is also known as
File handle
File copy
File directory
File link
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To force python to write the contents of file buffer on to storage file,........method may be used.
buffer()
write()
close()
flush()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does strip() function do?
Removes the trailing or leading spaces, if any.
Deletes the file
Remove the file object
Removes all the spaces between words
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which option is correct about this program? f=open(“ss.txt”,”wb”) print(“Name of the file:”,f.name) f.flush() f.close()
Compilation error
Runtime error
No output
Flushes the file when closing them
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to break the link of file object and the file on the disk.
open
close
break
end
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Yashi wants to check whether her name is listed in Shortlisted.dat or not. Which command she can write to open the file:
a=open(“Shortlisted.dat”,”rb”)
with open (“Shortlisted.dat’,’rb”) as a:
None
Both a and b
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
CAR AUDIO SISTEM
Quiz
•
12th Grade
10 questions
Edible water Bottle
Quiz
•
KG - Professional Dev...
10 questions
Plasma Cam 101
Quiz
•
9th - 12th Grade
10 questions
Tapping and Threading
Quiz
•
12th Grade - Professi...
11 questions
HEAT AND TEMPERATURE
Quiz
•
1st Grade - University
10 questions
TIK LATIHAN 1
Quiz
•
12th Grade
11 questions
Database Management
Quiz
•
12th Grade - University
10 questions
Counter part 2
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Instructional Technology
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade