TN Online TestSamacheer Kalvi practice

12th Standard Computer Science — Python and CSV files: Online Practice Test

Share this chapter: Telegram

Pick how many questions you want and set a time limit, then start. You'll get your score at the end with the correct answer and an explanation for every question. Free, in Tamil and English — 25 questions available.

Set up your test

Time remaining00:00
Q1
A CSV file is also known as a ....
Q2
The expansion of CRLF is
Q3
Which of the following module is provided by Python to do several operations on the CSV files?
Q4
Which of the following mode is used when dealing with non-text files like image or exe files?
Q5
The command used to skip a row in a CSV file is
Q6
Which of the following is a string used to terminate lines produced by writer() method of csv module?
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
Q8
Which of the following creates an object which maps data to a dictionary?
Q9
Making some changes in the data of the existing file or adding more data is called
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()
Q11
Which of the following file extensions is used for saving a Comma-Separated Values file?
Q12
What is another name commonly used to refer to a CSV file because of its plain, tabular structure?
Q13
If a specific field in a CSV file contains a comma as part of its actual data, how should that field be formatted?
Q14
When field data in a CSV file contains double-quotes as part of its actual value, how is it represented under standard formatting rules?
Q15
Which Python module provides the built-in library functions to parse and process CSV files?
Q16
What is the default file opening mode when using the built-in open() function in Python?
Q17
Which block statement is recommended to open files in Python to ensure they are automatically closed even if an exception occurs?
Q18
Which method of the csv.writer class is used to write a single row of data into a CSV file?
Q19
Which class of the Python csv module reads a CSV file and maps its data rows to dictionaries instead of lists?
Q20
What subclass of dictionary does the csv.DictReader class return by default for each row it iterates over in Python?
Q21
How can the default OrderedDict returned by csv.DictReader be converted into a standard Python dictionary?
Q22
Which formatting parameter of csv.register_dialect() is set to True to remove whitespaces immediately following a delimiter?
Q23
Which built-in Python function can be used to skip the header row of a CSV file before sorting or processing its data rows?
Q24
To sort a CSV file based on multiple columns, which operator function is passed as a key in the sorted() function?
Q25
Which of the following line terminators are accepted by Python's CSV module for terminating rows?

More for this chapter

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

About this Python and CSV files test

This free online practice test covers Python and CSV files from the 12th Standard Computer Science (Samacheer Kalvi) syllabus. Choose the number of questions and an optional time limit, then answer and submit — everything is checked in your browser, with the correct answers and a worked explanation shown at the end. For the full solutions to every question in this set, see the solved MCQs page.

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