
Test8

Quiz
•
Information Technology (IT)
•
9th - 12th Grade
•
Hard
Rares Hampi
Used 4+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will f.read() return after reaching EOF in a .txt file?
Raises EOFError
Returns empty string
Returns None
Loops to the beginning
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What happens if you use f.write("data") on a file opened with "r" mode?
Writes normally
Truncates the file first
Raises io.UnsupportedOperation
Returns False
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which is true about with open(...) as f: block?
It closes the file only on success
File stays open after the block ends
It guarantees file closure even on exceptions
Cannot be used with binary files
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does f.readlines() return by default?
A single string
List of lines with trailing newline characters
List of stripped strings
Generator
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What’s the result of calling f.write("abc\n", "def\n")?
Writes both lines
Writes only the first
SyntaxError
TypeError
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In CSV, what is the purpose of newline="" in open()?
Prevents empty columns
Combines rows
Prevents extra blank lines (Windows)
Forces UTF-8
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following uses keys to access values directly?
csv.reader
csv.writer
csv.DictReader
csv.reader with delimiter
Create a free account and access millions of resources
Similar Resources on Wayground
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 Information Technology (IT)
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
10 questions
Impact of 9/11 and the War on Terror

Interactive video
•
10th - 12th Grade
20 questions
Biomolecules

Quiz
•
9th Grade
21 questions
Lab Safety

Quiz
•
10th Grade