
G10 CS File Handling
Authored by Fritz Bansag
Computers
12th Grade
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code do?
f=open("test.txt")
Opens the file
in WRITE mode
Opens the file
in READ mode
Opens the file
both
READING and WRITING
Syntax Error
None of the choices
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when you try to open a file that does not exist using the code?
with open("test.txt",'w') as f:
A new file is created
Error message
pops up
Nothing happens
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does opening a file in mode ‘a’ mean?
with open("test.txt“, ‘a’) as f:
Open test.txt
for reading
Open test.txt
for writing
Open test.txt for appending text at the end of the file
None of the file
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
See the test1.txt file content to answer
This is now opened using this code: f=open("test1.txt",'r')
What is the output of f.read(15) ?
'This is a text file'
'This is a text'
'This is a text '
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
See the test1.txt file content to answer
This is now opened using this code: f=open("test1.txt",'r')
What is the output of f.read(15) ?
'This is a text file'
'This is a text'
'This is a test '
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
'as three lines.\nI am processing it using Python.‘
‘has three lines.\nI am processing it using Python.'
'This is a text file.\nIt has three lines.\nI am processing it using Python.'
None of the above
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
Cultura Digital 1º Trimestre (6º)
Quiz
•
5th - 12th Grade
10 questions
Fundamentals of Computing - Unit 5 Quiz 1 Review
Quiz
•
12th Grade
10 questions
Bài 2-Vai trò của thiết bị thông minh và tin học đối với xã hội
Quiz
•
10th - 12th Grade
13 questions
CCIS 104 Quiz #1.2
Quiz
•
12th Grade
10 questions
Tin học 10 _ Bài 16 _Định dạng văn bản
Quiz
•
10th - 12th Grade
15 questions
Quis Grade 5
Quiz
•
9th - 12th Grade
12 questions
File dan Folder
Quiz
•
9th - 12th Grade
10 questions
cybercrime
Quiz
•
12th Grade - 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
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