TN Online TestSamacheer Kalvi practice

12th Standard Computer Science — Python and CSV files: Book Back MCQs with Answers & Explanations

Share this chapter: Telegram

Every Book Back multiple-choice question from Python and CSV files (12th Standard Computer Science, Samacheer Kalvi) — each with the correct option highlighted and a clear, worked explanation. Free to read in English and Tamil.

Answer key at a glance

Q1
A CSV file is also known as a ....
  • A. Flat FileCorrect
  • B. 3D File
  • C. String File
  • D. Random File
Explanation. A CSV file is a flat file because it stores tabular data in a simple, plain text format without any relational hierarchies or complex formatting.
Q2
The expansion of CRLF is
  • A. Control Return and Line Feed
  • B. Carriage Return and Form Feed
  • C. Control Router and Line Feed
  • D. Carriage Return and Line FeedCorrect
Explanation. CRLF stands for Carriage Return and Line Feed, which is a special character sequence used to mark the end of a line in text files.
Q3
Which of the following module is provided by Python to do several operations on the CSV files?
  • A. py
  • B. xls
  • C. csvCorrect
  • D. os
Explanation. Python provides a built-in library module named csv specifically designed for reading, writing, and manipulating comma-separated values files.
Q4
Which of the following mode is used when dealing with non-text files like image or exe files?
  • A. Text mode
  • B. Binary modeCorrect
  • C. xls mode
  • D. csv mode
Explanation. Binary mode is used when dealing with non-text files like images or executables, as it reads and writes data as raw bytes.
Q5
The command used to skip a row in a CSV file is
  • A. next()Correct
  • B. skip()
  • C. omit()
  • D. bounce()
Explanation. The next() function is used to retrieve the next item from an iterator, which effectively skips the current row in a CSV file reader.
Q6
Which of the following is a string used to terminate lines produced by writer() method of csv module?
  • A. Line TerminatorCorrect
  • B. Enter key
  • C. Form feed
  • D. Data Terminator
Explanation. A line terminator is a string that specifies the character sequence used to terminate rows when writing or producing lines in a CSV file.
Q7
What is the output of the following program? import csv d=csv.reader(open('c:\\PYPRG\\ch13\\city.csv')) next(d) for row in d: print(row) if the file called 'city.csv' contains the following details: chennai,mylapore mumbai,andheri
  • A. ['chennai', 'mylapore']
  • B. ['mumbai', 'andheri']Correct
  • C. ['chennai']
  • D. ['chennai', 'mylapore', 'mumbai', 'andheri']
Explanation. The next() function skips the first row containing 'chennai,mylapore'. The loop then prints the next row, which is parsed as the list ['mumbai', 'andheri'].
Q8
Which of the following creates an object which maps data to a dictionary?
  • A. listreader()
  • B. reader()
  • C. tuplereader()
  • D. DictReader()Correct
Explanation. The DictReader class of the csv module parses each row in a CSV file and maps the fields directly into a Python dictionary.
Q9
Making some changes in the data of the existing file or adding more data is called
  • A. Editing
  • B. Appending
  • C. ModificationCorrect
  • D. Alteration
Explanation. Altering data by making changes to existing records or inserting additional rows in an already established CSV file is defined as modification.
Q10
What will be written inside the file test.csv using the following program? import csv D = [['Exam'],['Quarterly'],['Halfyearly']] csv.register_dialect('M',lineterminator = '\n') with open('c:\\pyprg\\ch13\\line2.csv', 'w') as f: wr = csv.writer(f,dialect='M') wr.writerows(D) f.close()
  • A. Exam Quarterly HalfyearlyCorrect
  • B. Exam Quarterly Halfyearly
  • C. Exam, Quarterly, Halfyearly
  • D. Exam Quarterly Halfyearly on a single line
Explanation. The program writes each sublist of D on a new line using a newline as the line terminator, resulting in three lines of text.
Take the Book Back practice test → Open the app

More for this chapter

Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods Formula SheetAll key formulas

About these Python and CSV files questions

These are the Book Back multiple-choice questions for Python and CSV files from the Tamil Nadu State Board (Samacheer Kalvi) 12th Standard Computer Science syllabus. Each question shows the correct option and an original, step-by-step explanation so you understand the method, not just the answer. Use the answer key above to jump to any question, then take the practice test to check yourself under exam-like conditions.

Frequently asked questions

How many MCQs are there in Python and CSV files?

This chapter has 10 book-back multiple-choice questions, each with the correct answer and a step-by-step explanation.

Are these 12th Standard Computer Science MCQs free to practise online?

Yes. Every question, answer and explanation here is free, and you can also take them as a timed practice test.

Where can I find the Python and CSV files book-back answers?

The correct option for each question is highlighted on this page with a worked explanation, plus a quick answer-key summary at the top.

More chapters in Computer Science

View all
1 Function 2 Data Abstraction 3 Scoping 4 Algorithmic Strategies 5 Python -Variables and Operators 6 Control Structures 7 Python functions 8 Strings and String manipulation 9 Lists, Tuples, Sets and Dictionary 10 Python Classes and objects 11 Database Concepts 12 Structured Query Language (SQL) 14 Importing C++ programs in Python. 15 Data manipulation through SQL 16 Data visualization using pyplot: line chart, pie chart and bar chart