Python csv files

Python csv files

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Amita Dahiya

Used 8+ times

FREE Resource

Student preview

quiz-placeholder

7 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

write statement to use the required module for working with comma separated values (csv) files.

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

Write the appropriate statement in the blank.

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which is not a text file?

data.txt

data.csv

data.rft

data.mp3

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which file is not binary file?

student.mp4

student.jpeg

student.csv

student.exe

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which file execute faster?

Text file

Binary file

CSV file

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Assume you have a file object my_data which has properly opened a separated value file that uses the tab character (\t) as the delimiter.

What is the proper way to open the file using the Python csv module and assign it to the variable csv_reader?

Assume that csv has already been imported.

csv.reader(my_data, tab_delimited=True)

csv.tab_reader(my_data)

csv.reader(my_data, delimiter='\t')

csv.reader(my_data)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given the following code block that assumes csv_reader is an object returned from csv.reader(), what would be printed to the console with each iteration?


for item in csv_reader:

print(item)

The row data as a list

The column data as a list

The full line of the file as a string

The individual value data that is separated by the delimiter

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?