Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

Which library is used to handle CSV files in Python?

View

Which mode is recommended for writing to a CSV file?

View

How do you open a CSV file to avoid newline issues on Windows?

View

Which method writes a list of values as a CSV row?

View

How do you read a CSV file as a list of dictionaries?

View

What delimiter is used by default in a CSV file?

View

Which method writes multiple rows to a CSV file?

View

How do you change the delimiter in a CSV file?

View

How do you skip the header row while reading a CSV?

View

What will happen if the delimiter is not properly specified?

View

Which library is used to handle CSV files in Python?

csv
json
xml
os

Which mode is recommended for writing to a CSV file?

'w'
'wb'
'a'
'w+'

How do you open a CSV file to avoid newline issues on Windows?

open(file, 'w', newline='')
open(file, 'wb')
open(file, 'a')
open(file, 'r+', newline='\n')

Which method writes a list of values as a CSV row?

writerow()
writeline()
write()
add_row()

How do you read a CSV file as a list of dictionaries?

csv.DictReader()
csv.reader()
json.load()
file.read()

What delimiter is used by default in a CSV file?

Comma (,)
Semicolon (;)
Colon (:)
Tab (\t)

Which method writes multiple rows to a CSV file?

writelines()
writerows()
add_lines()
batch_write()

How do you change the delimiter in a CSV file?

Use the delimiter parameter in csv.writer()
Modify the file header
Use csv.set_delimiter()
It is not possible

How do you skip the header row while reading a CSV?

Use next() on the reader object
Set skip_header=True
Use file.skip()
Call header() method

What will happen if the delimiter is not properly specified?

Incorrect parsing of the file
FileNotFoundError
IOError
The program crashes