Test8

Test8

9th - 12th Grade

30 Qs

quiz-placeholder

Similar activities

Visual Basic for Applications

Visual Basic for Applications

10th Grade

25 Qs

AP COMP SCI A: CodeHS Units 6/7/8 VOCAB

AP COMP SCI A: CodeHS Units 6/7/8 VOCAB

12th Grade

26 Qs

STS Ganjil Pemrograman Perangkat Bergerak Kelas XII

STS Ganjil Pemrograman Perangkat Bergerak Kelas XII

12th Grade

30 Qs

Soal Harian Pertemuan 2 PHP : Variabel, Tipe Data, Operator,

Soal Harian Pertemuan 2 PHP : Variabel, Tipe Data, Operator,

11th Grade

30 Qs

Penilaian Tengah Semester Informatika 2025/2026

Penilaian Tengah Semester Informatika 2025/2026

9th Grade

30 Qs

Kiểm Tra Giữa Kỳ Lập Trình Python

Kiểm Tra Giữa Kỳ Lập Trình Python

9th Grade

30 Qs

Materi While Loop dan For Loop

Materi While Loop dan For Loop

11th Grade

25 Qs

Latihan Soal PHP MySQL

Latihan Soal PHP MySQL

10th Grade

25 Qs

Test8

Test8

Assessment

Quiz

Information Technology (IT)

9th - 12th Grade

Hard

Created by

Rares Hampi

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?