12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 13/05/2022
QB365 provides detailed and simple solution for every Creative Questions in class 12 Computer Science Subject. It will helps to get more idea about question pattern in every Creative questions with solution.
latest Creative QuestionsDownload Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
How will you write Dictionary into CSV file with custom dialects?
2.
Write a program to read CSV file with a line Terminator.
3.
How will you sort more than one column in a CSV file? Explain with an example.
4.
Write a program to read the CSV file and store it in a list.
5.
Write a program to read the CSV file with user defined delimiter.
1.
import csv
csv.register_dialect('myDialect', delimiter = '|', quoting=csv.QUOTE_ALL)
with open('c:\\pyprg\\ch13\\ grade.csv', 'w') as csvfile:
fieldnames = ['Name', 'Grade']
writer = csv.DictWriter(csvfile,
fieldnames=fieldnames. dialect ="myDialect")
writer.writeheader()
writer.writerows([{'Grade': 'B', 'Name': Anu'},
{'Grade': 'A', 'Name': 'Beena',},
{Grade': 'C', 'Name': 'Tarun'}])
print("writing completed")
2.
import csv
Data = [['Fruit', 'Quantity'], ['Apple', '5'], ['Banana', '7']' ['Mango: '8']]
csv.register_dialect('mydialect; delimiter = '|', lineterminator = '\n')
with open('c:\\pyprg\\ch3\\line.csv', 'w') as f:
writer = csv.writer(f, dialect='myDialect')
writer.writerows(Data)
f.close ( )
3.
To sort by more than one column you can use itemgetter with multiple indices: operator. itemgetter (1,2).
The following program do the task mentioned above using operator.itemgetter(col_no)
Example:
# Program to sort the entire row by using a specified column.
# declaring multiple header files
import csv, operator
#One more way to read the file
data = csv.reader(open('c:\\PYPRG\ \sample8.csv'))
next(data) #(to omit the header)
#using operator module for sorting multiple columns
sortedlist = sorted (data, key=operator.
itemgetter(1) # 1 specifies we want to sort
# according to second column for row in sortedlist:
print(row)
Output:
['Mouse', '20']
['Keyboard', '48']
['Monitor', '52']
4.
import csv
# other way of declaring the filename
inFile= 'c:\\pyprg\\sample.csv'
F=open (inFile,' r')
reader = csv.reader(F)
# declaring array
arrayValue = [ ]
# displaying the content of the list for row in reader:
arrayValue.append(row)
print(row)
F.close( )
5.
Import csv
csv.register_dialect('myDialect', delimiter = '|')
with open ('c:\\pyprg\\sample4.csv', 'r') as f:
reader = csv,reader(f, dialect='myDialect')
for row in reader:
print(row)
f.close( )
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards