
File Handling in Python Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
Shabnam pusa
Used 1+ times
FREE Resource
Enhance your content in a minute
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to open a file in Python?
fileopen()
open()
fopen()
readfile()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default mode in which a file is opened using open()?
write
append
read
exclusive
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will file.read() return?
A list of lines
The entire file content as a string
One character
Nothing
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method reads only a single line from the file?
read()
readline()
readlines()
line()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to read all lines in a file as a list?
read()
readline()
readlines()
all()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does file.write("Hello") do?
Reads Hello from file
Writes Hello to file
Appends Hello
Deletes Hello
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which mode is used to write to a file (overwriting if exists)?
'r'
'a'
'w'
'rw'
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
55 questions
Advanced HTML5 & CSS3 Part IV
Quiz
•
9th - 12th Grade
50 questions
Digital Graphics - Terminology, File Types, Photoshop Basics
Quiz
•
9th - 12th Grade
50 questions
MID INFORMATIKA
Quiz
•
9th - 12th Grade
52 questions
Media and Information Literacy (Generated)
Quiz
•
12th Grade
50 questions
virtual memory
Quiz
•
11th - 12th Grade
47 questions
MS Word Preliminary Examination
Quiz
•
10th Grade - University
49 questions
Career Trivia Quiz
Quiz
•
8th - 12th Grade
50 questions
UTS Teknologi Layanan Jaringan
Quiz
•
12th Grade
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
