
Computer Science Quiz - Grade XII

Quiz
•
Computers
•
12th Grade
•
Medium
Amudhavalli K
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is the correct mode to open a text file for reading?
rb
r
w
a
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which method is used to read the entire contents of a text file as a single string?
readline()
readlines()
read()
input()
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the readline() function return?
A list of lines
One line at a time as a string
The number of lines
None of the above
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which method is used to write data to a text file?
input()
print()
write()
append()
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What happens if a file is opened in 'w' mode and it already exists?
It appends to the file
It raises an error
It deletes the contents of the file
It does nothing
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you close a file in Python?
file.close()
file.stop()
file.end()
close(file)
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the 'a' mode do when opening a file?
Opens for reading
Opens for writing (overwrites)
Opens for appending
Opens for deleting
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Basic Linux Commands Part 1

Quiz
•
9th - 12th Grade
10 questions
UNIT3-Multimedia-Exam_AB

Quiz
•
12th Grade
20 questions
Exploring File Operations in Python

Quiz
•
12th Grade
10 questions
Wrażenia globlne w Linxie

Quiz
•
10th Grade - University
20 questions
HTML & CSS Review

Quiz
•
7th - 12th Grade
20 questions
Text File Handling Set -1

Quiz
•
12th Grade
19 questions
ICT_IGCSE_Chapter11_FileManagment

Quiz
•
9th - 12th Grade
20 questions
Module 21 - Local Area Networking 4

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