Search Header Logo
LECTURE 05 Flashcards (25.11.2025)

LECTURE 05 Flashcards (25.11.2025)

Assessment

Flashcard

Engineering

University

Practice Problem

Hard

Created by

fgv fgv

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

FLASHCARD QUESTION

Front

True or False: Using the `with open()` statement in Python ensures that the file is closed automatically after the block is executed.

Back

True

2.

FLASHCARD QUESTION

Front

Which module is recommended for modern, object-oriented file and directory path handling in Python?

Back

pathlib

3.

FLASHCARD QUESTION

Front

True or False: The `csv.DictReader` object reads each row of a CSV file as a dictionary, using the column headers as keys.

Back

True

4.

FLASHCARD QUESTION

Front

Which of the following is NOT a benefit of using a context manager for file operations?

Back

Cross-platform path handling

5.

FLASHCARD QUESTION

Front

True or False: If you open a file with `open()` but forget to call `close()`, the operating system will always immediately free the resource.

Back

False

6.

FLASHCARD QUESTION

Front

Which Python object allows you to read CSV files as dictionaries?

Back

csv.DictReader

7.

FLASHCARD QUESTION

Front

What does the 'r' mode signify when opening a file in Python?

Back

Read mode

Access all questions and much more by creating a free account

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

Already have an account?