G10 CS File Handling

Quiz
•
Computers
•
12th Grade
•
Hard
Fritz Bansag
Used 8+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
KOMPUTER AKUNTANSI MYOB KELAS XII

Quiz
•
12th Grade
10 questions
BTEC National ICT - U1 LAA Software File Types 3

Quiz
•
12th Grade
10 questions
ข้อสอบ Microsoft Word

Quiz
•
10th - 12th Grade
12 questions
Uji Pengetahuan Sistem Operasi Linux

Quiz
•
9th - 12th Grade
15 questions
File Handling in Python

Quiz
•
12th Grade
15 questions
Computer Science Quiz - Grade XII

Quiz
•
12th Grade
10 questions
File Type Extensions

Quiz
•
8th Grade - University
15 questions
SOM - Comandos LINUX

Quiz
•
9th Grade - University
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