File Handling Py Reading
Passage
•
Computers
•
11th - 12th Grade
•
Hard
Andrew Ward
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to open a file in Python?
open()
read()
write()
close()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which mode is used to open a file for writing, creating a new file or overwriting an existing one?
w
r
a
r+
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the read() function do in Python file handling?
Reads the entire file
Reads one line from the file
Writes data to the file
Closes the file
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to write a list of lines to a file in Python?
writelines()
write()
readlines()
read()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the close() function in file handling?
To save resources by closing the file
To open a file
To read the file's contents
To write to a file
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which mode can you both read and write to a file in Python?
r+
r
w
a
Similar Resources on Wayground
8 questions
WEEK 11 W PART 2
Passage
•
10th Grade
2 questions
SIMPLE PRESENT, PROGRESSIVE, PAST
Passage
•
KG
9 questions
GWtW B2. End of Year Test. Use of English (Part 2)
Passage
•
10th Grade
8 questions
Nokia Phones
Passage
•
KG
8 questions
Favourite Outdoor Activity
Passage
•
12th Grade
6 questions
Traditions around the world A1 Reading comprehention
Passage
•
9th - 12th Grade
6 questions
11 AGD U5 RW Discuss T2
Passage
•
10th Grade
6 questions
The Legacy of Victor Frankenstein
Passage
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade