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
6 questions
Untitled reading quiz

Passage
•
9th - 10th Grade
6 questions
TEST 01: FUTURE CONTINUOUS

Passage
•
University
2 questions
berpikir komputasi

Passage
•
10th Grade
6 questions
Apple's Research on LLMs

Passage
•
11th Grade
7 questions
Feet in Smoke

Passage
•
11th Grade
7 questions
Primary Memory Reading

Passage
•
9th - 10th Grade
6 questions
Grasslands, Prairies, and Savannas

Passage
•
KG - University
7 questions
Turkey Habitat Maintanence

Passage
•
11th 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