
Python File Handling Quiz
Authored by Amy Austin
Computers
12th Grade
Used 22+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key function for working with files in Python?
close()
file()
open()
read()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many parameters does the open() function take in Python?
One
Two
Three
Four
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the two parameters of the open() function in Python?
file and type
path and class
filename and mode
directory and access
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "r" mode do when opening a file in Python?
Reads and writes to a file
Reads a file, creates a new file if it does not exist
Reads a file, error if the file does not exist
Reads a file, truncates the file first
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "a" mode do when opening a file in Python?
Appends to a file, error if the file does not exist
Appends to a file, creates the file if it does not exist
Appends to a file, truncates the file first
Appends to a file, reads from the file first
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "w" mode do when opening a file in Python?
Writes to a file, error if the file does not exist
Writes to a file, creates the file if it does not exist
Writes to a file, reads from the file first
Writes to a file, appends to the file if it exists
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "x" mode do when opening a file in Python?
Creates the specified file, error if the file does not exist
Creates the specified file, appends to the file if it exists
Creates the specified file, truncates the file first
Creates the specified file, returns an error if the file exists
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
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
10 questions
Explorando Tinkercad en Secundaria
Quiz
•
7th Grade - University
10 questions
2025 python class first quiz
Quiz
•
9th Grade - University
13 questions
Stepwise Refinement
Quiz
•
11th - 12th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade