Students must start practicing the questions from CBSE Sample Papers for Class 12 Computer Science with Solutions Set 10 are designed as per the revised syllabus.

CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions:

  • This question paper contains five sections, Section A to E.
  • All questions are compulsory.
  • Section A have 18 questions carrying 01 mark each.
  • Section B has 07 Very Short Answer type questions carrying 02 marks each.
  • Section C has 05 Short Answer type questions carrying 03 marks each.
  • Section D has 03 Long Answer type questions carrying 05 marks each.
  • Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35 against part c only.
  • All programming questions are to be answered using Python Language only.

Section – A

Question 1.
State True or False. [1]
The result of 4+4/2+2 is 8.
Answer:
True

Question 2.
When a stack is full and no element can be added, it is called an ________. [1]
(A) Overflow
(B) Extraflow
(C) Out of range
(D) Underflow
Answer:
Option (A) is correct.

Explanation:
Overflow is the condition in which there is no memory left to accommodate a new item in a fixed size stack.

Question 3.
Which of the following loop is not supported by the python programming language? [1]
(A) for loop
(B) while loop
(C) do…while loop
(D) None of the above
Answer:
Option (C) is correct.

Explanation:
There are two looping constructs in Python – for and while.

Question 4.
Suppose the content of a text file “Rhymes.txt” is as follows: [1]
Jack & Jill
went up the hill
What will be the output of the following Python code?
F = open(“Rhymes.txt”)
L = F.readlines()
for i in L:
S=i.split() print(len(S),end=”#”)
(A) 2#4#
(B) 3#4#
(C) 2#
(D) 7#
Answer:
Option (B) is correct.

Explanation:
F.readlines() will read the contents of the text file as a list, where each element of the list is a line of the file. Now for loop will iterate over each element of this list(each line of the text file) and split it into words and store as elements of list S (here each word of the line forms an element of the list S). print statement will print length of this list. So in first iteration length of first line i.e 3 will be printed and in second iteration length of second line 4 will be printed.

CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions

Question 5.
Which statement will check if a is equal to b? [1]
(A) if a = b:
(B) if a = = b:
(C) if a = = = c:
(D) if a = = b
Answer:
Option (B) is correct.

Explanation:
if a==b: will check if a is equal to b. If statement allows branch depending upon the value or state of variables. If the condition evaluates true, an action is followed otherwise, the action is ignored.

Question 6.
Which is the correct form of declaration of dictionary? [1]
(A) Day = {1 :’monday’,2:’tuesday’,3:’wednesday’}
(B) Day=(l;’monday’/2;’tuesday’,3;’wednesday’)
(C) Day= [r.’monday’^-.’tuesday’^’.’wednesday’]
(D) Day = {1’monday’,2’tuesday’,3’Wednesday’]
Answer:
Option (A) is correct.

Explanation:
In Python, dictionary is an unordered collection of data values that stored the key: value pair instead of single value as an element. Keys of a dictionary must be unique and of immutable data types such as strings, type etc.

Syntax
dictionary name = {key 1 : value 1, key 2 : value 2, …} 1

Question 7.
Which of the following is a mathematical function? [1]
(A) sqrt 0
(B) Rhombus 0
(C) add 0
(D) RqrtAdd 0
Answer:
Option (A) is correct.

Explanation:
Functions defined in math module are used to perform mathematical calculations such as sqrt(),cos(), etc.

Question 8.
Which of the following method reflects the changes made in database permanently? [1]
(A) < connection >.done()
(B) < connection >. final
(C) <connection>.reflect()
(D) <connection>.commit()
Answer:
Option (D) is correct.

Explanation:
A COMMIT means that the changes made in the current transaction are made permanent and become visible to other sessions.

Question 9.
Which of these is the best description of a list in Python? [1]
(A) A list is a collection of data that has an order and can be changed
(B) A list is a lot of variables
(C) A list is used for shopping
(D) A list is a collection of data that cannot hold duplicated data and cannot be changed
Answer:
Option (A) is correct.

Explanation:
The Python lists are containers that are used to store a list of values of any type. A list is a standard data type of Python that can store a sequence of values belonging to any type. The values that make up a list are called its elements, and they can be of any type which means list can contain values of mixed data types. The lists are enclosed within square brackets.

CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions

Question 10.
Fill in the blank
________ method of cursor class is used to insert or update multiple rows using a single query? [1]
(A) cursor.executeall(query, rows)
(B) cursor.execute(query, rows)
(C) cursor.executemultiple (query, rows)
(D) cursor.executemany(query, rows)
Answer:
Option (D) is correct.

Explanation:
executemany() is like simple iteration that provides a repetitive execution of INSERT and UPDATE across multiple rows

Question 11.
Each line of a text file is terminated by a special character called ________. [1]
(A) DNS
(B) IP
(C) CSV
(D) EOL
Answer:
Option (D) is correct.

Explanation:
Each line of a text file is terminated a special character called EOL (End of line) when a text editor or a program interpreter encounters the ASCII equivalent of the EOL character

Question 12.
Which of the following join selects all rows from both the tables as long as the condition satisfies? [1]
(A) Inner Join
(B) Left Join
(C) Right Join
(D) Natural Join
Answer:
Option (A) is correct.

Explanation:
The INNER JOIN keyword will create the result-set by combining all rows from both the tables where the condition satisfies i.e value of the common field will be same.

Question 13.
Fill in the blank
Router in a network ________. [1]
(A) Forwards a packet to all outgoing links
(B) Forwards a packet to the next free outgoing link
(C) Determines on which outing link a packet is to be forwarded
(D) Forwards a packet to all outgoing links except the originated link
Answer:
Option (C) is correct.

Explanation:
A router is a device that provides Wi-Fi and is typically connected to a modem.
It sends information from the internet to personal devices like computers, phones, and tablets. These internet-connected devices in your home make up your Local Area Network (LAN).

Question 14.
Which symbols are used to open and close a list? [1]
(A) () round brackets
(B) { } curly brackets
(C) [ ] square brackets
(D) ” ” speech marks
Answer:
Option (C) is correct.

Explanation:
The square brackets [ ] are used to enclose the items of the list

Question 15.
Which of the following aggregate functions ignore NULL values? [1]
(A) COUNT
(B) MAX
(C) AVERAGE
(D) All of these
Answer:
Option (D) is correct.

Explanation:
If an aggregate function is executed against a column that contains nulls, then the function ignores it. This prevents unknown or inapplicable values from affecting the result of the aggregate function.

Question 16.
The MIN () function finds the ________. [1]
(A) Minimum number of records entered in a table
(B) Minimum number of rows allowed to be entered
(C) Minimum value of the selected column
(D) None of these
Answer:
Option (C) is correct.

Explanation:
The SQL MIN() function is used to return the minimum value of an expression in a SELECT statement. E.g. SELECT MIN(per) AS “Lowest Percentage” FROM student. The above statement will return the minimum value of percentage from column PER in STUDENT table.

CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions

Assertion and Reason:
In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as.
(A) Both A and R are true and R is the correct explanation for A.
(B) Both A and R are true and R is not correct explanation for A.
(C) A is true but R is false.
(D) A is false but R is true.

Question 17.
Assertion (A): Using append(), many elements can be added at a time.
Reason (R): For adding more than one element, extend() method can be used. [1]
Answer:
Option (D) is correct.

Explanation:
Using append(), only one element at a time can be added. For adding more than one element, extend() method can be used, this can also be used to add elements of another list to the existing one.

The extend( ) function accepts a list as an argument and puts the elements of the list at the end of the sequence
Example:
>>> a = [10,20,30,40,50]
>>>a.extend([60,70,80])
>>>a
[10,20,30,40,50,60,70,80]

Question 18.
Assertion (A): A list can have elements of different data types
Reason (R): Elements of a list are enclosed in square brackets and are separated by comma. [1]
Answer:
Option (B) is correct.

Explanation:
A list can have elements of different data types, such as integer, float, string, tuple or even another list. A list is very useful to group together elements of mixed data types.
Elements of a list are enclosed in square brackets and are separated by comma. Like string indices, list indices also start from 0.

Section – B

Question 19.
Find errors in the following code. Rewrite the new code and underline the part corrected. [2]
For i range(10)
b = 20 – i
print (b)
Answer:
for i in range(10):
_b=20-i
print(b)

Question 20.
How does WWW work ? [2]
OR
What is a computer network? What is the expanded form of XML?
Answer:
The world wide web (WWW) is a network of online content that is formatted in HTML and accessed via HTTP. The term www refers to all the interlinked HTML pages that can be accessed over the Internet. The world wide web is an example of client and server technology. The Internet uses software known as the web browser that requests documents located on the web. The request is made by the browser to the internet host server containing the document. The browser acts like a host server the information and thus, is called the server.
OR
A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other.
XML – exensible
Markup
Language

CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions

Question 21.
(a) If the user inputs : 10<ENTER>, what does the following code snippet print? [2]
x = float (input ())
if(x<10):
print(“Less than 10”)
elif (x >= 10) :
print(“Greater than 10 “)
else:
print (“No”)
(b) What does the following code print to console?
if True:
print(10)
else :
print (20)
Answer:
(a) Greater than 10.
(b) 10

Commonly Made Error
Sometimes students forget the correct execution of if statement.

Answering Tip
Students should remember the correct working and execution of all conditional and iterative statements.

Question 22.
What is Hierarchical model? [2]
Answer:
The hierarchical model was developed by IBM in 1968. The data is organised in a tree structure where the nodes represent the records and the branches of the tree represent the fields. Since the data is organized in a tree structure, the parent node has the links to its child nodes.

If we want to search a record, we have to traverse the tree from the root through all its parent nodes to reach the specific record. Thus, searching for a record is very time consuming

Question 23.
(a) Which option would you choose on the web browser if a web page takes too long to load and we wish to load the same page again ?
(b) What is web hosting? [2]
Answer:
(a) Refresh (F5 key) (1 mark for correct answer)
(b) Web hosting is the service that makes our website available to be viewed by others on the Internet.
A web host provides space on its server, so that other computers around the world can access our website by means of a network or modem.

Question 24.
What will be the output of the following Python code? [2]
f = None
for i in range (5):
with open(“data.txt”, “w”) as f:
if i > 2 : break
print (f .closed) [2]
OR
Find and write the output of the following python code: def Changer(P,Q=10):
P=P/Q
Q=P%Q
print( P,”#”,Q )
return P
A=200
B=20
A=Changer(A,B)
print (A,”$”,B )
B=Changer(B)
print (A,”$”,B)
A=Changer(A)
print (A, ” $”, B )
Answer:
True
OR
10.0 # 10.0
10.0 $ 20
2.0 # 2.0
1.0 # 1.0
1.0 $ 2.0

CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions

Question 25.
Differentiate between Primary key and Candidate key. [2]
OR
Differentiate between Degree and Cardinality.
Answer:
A Candidate Key can be any column or a combination of columns that can qualify as unique key in database. There can be multiple Candidate Keys in one table where as A Primary Key is a column or a combination of columns that uniquely identify a record.
Only one Candidate Key can be Primary Key.
OR
Degree: It is the total number of attributes in the table.
Cardinality: It is the total number of tuples in the table

Section – C

Question 26.
(a) TISHYA has to create a table named CITY in the database to store the records of various cities across the globe. The CITY has the following structure:
Table: CITY

FIELD NAME DATA TYPE REMARKS
CITYCODE CHAR(5) Primary Key
CITYNAME CHAR(30
SIZE INTEGER
AVGTEMP INTEGER
POLLUTIONRATE INTEGER
POPULATION INTEGER

Help her to complete the task by suggesting appropriate SQL commands.

(b) Write the output of the queries (i) to (iv) based on the table, Furniture given below:
Table: FURNITURE
CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions 1
(i) SELECT SUM (DISCOUNT) FROM FURNITURE WHERE COST > 15000;
(ii) SELECT MAX (DATE OFPURCHASE)FROM FURNITURE;
(iii) SELECT * FROMFURNITURE WHERE DISCOUNTS AND FID LIKE ” T%’
(iv) SELECT DATEOFPURCHASE FROM FURNITURE WHERE NAME IN (“Dining Table”, “Console Table”); [3]
Answer:
(a)

CREATE DATABASE MYEARTH;
CREATE TABLE CITY
(
CITYCODE CHAR (5) PRIMARY KEY,
CITYNAME CHAR (30),
SIZE INT,
AVGTEMP ITN,
POPULATIONATE INT,
POPULATION INT;

(b) (i) 29
(ii) 01-Jan-2021
(iii) T006 Console Table 17-Nov-2019 1500 12
(iv) 10-Mar-2020 17-Nov-2019

Question 27.
Write a function to count the number of lines starting with a digit in a text file “Story.txt”. [3]
OR
Consider the file “Poem.txt”
Autumn Song
Like a joy on the heart of a sorrow,
The sunset hangs on a cloud;
A golden storm of glittering sheaves,
Of fair and frail and fluttering leaves,
The wild wind blow in a cloud.
Define a function reverse() that prints the lines of the file in reverse order.
Answer:

def CountFirstDigit():
count=0
with open('Story.txt','r') as f:
while True:
line=f.readline()
if not line:
break
if line[0].isdigit():
count = count+1
if count==0:
print ("no line starts with a digit")
else:
print ("count=",count)

OR

def reverse():
file=open("Poem.txt","r")
text=file.readlines()
file.close()
line=len(text)
for i in range (line-1,-1,-1):
print(text[i])

Question 28.
(a) Consider the table, MOVIEDETAILS given below:
Table: MOVIEDETAILS
CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions 2
Identify the degree and cardinality of the table.

(b) Find output for SQL queries (i) to (iv), Which are based on the table.
Table: ACCOUNT

ANO ANAME ADDRESS
101 Nirja Singh Bangalore
102 Rohan Gupta Chennai
103 Ali Reza Hyderabad
104 Rishabh Jain Chennai
105 Simran Kaur Chandigarh

Table: TRANSACT
CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions 3
(i) SELECT ANO, ANAME FROM ACCOUNT WHERE ADDRESS NOT IN (‘CHENNAI’, ‘BANGALORE’);
(ii) SELECT DISTINCT ANO FROM TRANSACT;
(iii) SELECT ANO, COUNT (*), MIN (AMOUNT) FROM TRANSACT GROUP BY ANO HAVING COUNT
(iv) SELECT COUNT (*), SUM (AMOUNT) FORM TRANSACT WHERE DOT < = ‘2017-06-01’; [3] ,
Answer:
(a) DEGREE =5
CARDINALITY=6

(b) (i)

ANO ANAME
103 Ali Reza
105 Simran Kaur

(ii) DISTINCT ANO
101
102
103
Note: Values may be written in any order
(iii)

ANO Count(*) MIN (AMOUNT)
101 2 2500
103 2 1000

(iv)

COUNT (*) SUM (AMOUNT)
2 5000

Question 29.
Write a function that takes one argument (a positive integer) and reports if the argument is prime or not. [3] ]
Answer:

def prime(n):
for i in range (2,n/2):
if 0 n%i==0:
print(n,"is not prime")
return

Question 30.
A list contains following record of a customer: [3]
[Customer_name, Phone_number, City]
Write the following user defined functions to perform given operations pir the stack named ‘status’: :
(i) Push_element() – To Push an object containing name and Phone number of customers who live in Goa to :
the stack ;
(ii) Pop_element() – To Pop the objects from the stack and display them. Also, display “Stack Empty” when there are no elements in the stack.
For example:
If the lists of customer details are:
[“Gurdas”, “99999999999”,”Goa”]
[“Julee”, “8888888888”,”Mumbai”] [“Murugan”,”77777777777″,”Cochin”]
[“Ashmit”, “1010101010”,”Goa”]
The stack should contain
[“Ashmit”,”1010101010″] ‘
[“Gurdas”,”9999999999″]
The output should be:
[“Ashmit”,”1010101010″]
[“Gurdas”,”9999999999″]
Stack Empty
OR
Write a function in python to count the number of lines in a text file ‘Hello.TXT’ which is starting with an alphabet ‘AN’.
Answer:

status=[]
def Push_element(cust):
if cust[2]=="Goa":
L1= [cust [0] ,cust [1]]
status.append(L1)
def Pop_element ():
num=len(status)
while len(status)!=0:
dele=status.pop()
print(dele)
num=num-1
else:
print("Stack Empty")

OR

def COUNTLINES():
file=open ( ' Hello. TXT' , ' r' )
lines = file.readlines()
count=0
for w in lines:
if w[0]=="AN" or w[0]=="an":
count = count +1
print("Total lines starting with 'AN'", count)
file.close()

Section – D

Question 31.
Software Development Company has set up its new centre at Raipur for its office and web based activities. It has 4 blocks of building named Block A, Block B, Block C, Block D.
Number of Computers

Block A  25
Block B  50
Block C  125
Block D  10

Shortest distances between various Blocks in meters:

Block A to Block B 60
Block B to Block C 40
Block C to Block A 30
Block D to Block C 50

(i) Name the most suitable block where the server should be installed.

(ii) Suggest the type of network to connect all the blocks with suitable reason .

(iii) The company is planning to link all the blocks through secure and high-speed wired medium. Suggest a way to connect all the blocks.

(iv) Suggest the most suitable wired medium for efficiently connecting each computer installed in every block out of the following network cables:

  • Coaxial Cable
  • Ethernet Cable
  • Single Pair Telephone Cable.

(v) What is the use of Ethernet cable? [5]
Answer:
(i) Block C, It has maximum number of computers.
(ii) LAN. Because network spans over a building.
(iii) Star topology
CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions 4
(iv) Ethernet Cable
(v) Ethernet cables are used to provide an internet connection and connect devices to a local network.

Question 32.
(a) Find and write the output of the following Python code:
Data = [“P”,20,”R”,10,”S”,30]
Times = 0
Alpha = “”
Add = 0
for C in range(1,6,2) :
Times = Times + C
Alpha = Alpha + Data[C-l]+”$”
Add = Add + Data[C]
print Times,Add,Alpha

(b) Write a Python code to insert following records into table Orders as follows
Database → Sales
userid → salesmanl
password → salel

Table: Orders

ORDNUMB CUSTNO ORDDTE
12489 124 01-03-98
12491 311 10-03-98
12495 315 31-03-98
12498 522 10-04-98

OR
(a) Find the output from the following code:
t=tuple ()
t = t +(‘Python’,)
print (t)
print (len(t))
t1 = (10,20,30)
print (len(t1))

(b) Consider the following table Order Details of database sales
Table: Sales
CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions 5
Write Python code to increase NUMBORD by 5 if QUOTPRIC is less than 100 or NTJMBORD is greater than 3.
Answer:
(a) Output
1 20 P$
4 30 P$R$
9 60 P$R$S$

(b)

import MySQLdb
db=MySQLdb.connect(‘localhost’, ‘salesmanl’, ‘salel’, ‘Sales’)
cursor=db.cursor(prepared=TRUE)
sql_query=”””INSERT INTO Orders (ORDNUMB, CUSTNO, ORDDTE) VALUES (‘%s’, ‘%s’, ‘%s’)””” rec_inst=[(‘12489’, ‘124’, ’01-03-98’), (‘12491’, ‘311’, ’10-03-98’), (‘12495’, ‘315’, ’31-03-98’), (‘12498’, ‘522’, ’10-04-98’)]
try:
cursor.executemany(sql_query, rec_inst)
print(cursor.rowcount, “Records inserted successfully”)
db.commit()
except:
db.rollback()
cursor.close()
db.close()

OR

(a) (‘Python’,)
1
3
(b)

import MySQLdb
db=MySQLdb.connect(‘localhost’, ‘Admin’, ‘SalA345’, ‘sales’)
cursor=db.cursor()
sql=”””UPDATE OrderDetails set
NUMBORD=NUMBORD+5 where QUOTPRIC <’%d’ OR NUMBORD> ‘%d’”””
check_value = (100,3)
try:
db.execute(sql, check_value)
db.commit()
except:
db.rollback()
db.close()

Question 33.
Write a function that takes a sorted list and a number as an argument. Search for the number in the sorted list using binary search. [5]
OR
Write any two needs for a data file.
A file sports.dat contains information about a formal Event Participant.
Write a function that would read contents from file sports.dat and creates a file named Athletics.dat copying only those records from sports.dat where the event name is “Athletics” A
Answer:

def binary_search(SORTEDLIST, number):
low=0
high=len(SORTEDLIST)
found=False
while(low<high) and found==False:
mid=(int)(low+high)/2
if SORTEDLIST[mid]==number:
print ("Number found at",mid)
found=True
break
elif SORTEDLIST[mid]<number:
low=mid+1
else:
high=mid -1
if low >= high:
print ("Number not found")
maxrange = input("Enter Count of numbers: ")
numlist = []
for i in range(0, maxrange):
numlist. append (input (" ?") )
numlist.sort()
print ("Sorted list",numlist)
number = input("Enter the number") 
binary_search(numlist,number)

OR

(i) It is a convenient way to deal with large quantities of data.
(ii) To avoid input of data multiple times during program execution.

PROGRAM

def athletics( ):
file1 = open ("sports.dat",'r')
file2 = open ("Athletics.dat",'w')
rec = filel.readlne ()
while rec! = " ":
sport = rec.split('n')
if sport[0] == "Athletics":
file2.write (rec)
file2.write ('\n')
else:
pass
rec = filel.readlne ()
filel.close()
file2 . close ()
return

Commonly Made Error:
Indentation is missing while programming by some students.

Answering Tip:
Indentation must be taken care of and should be checked on completion of the code.

Section – E

Question 34.
Consider the following tables SCHOOL and ADMIN and answer the following questions:
Table: SCHOOL
CBSE Sample Papers for Class 12 Computer Science Set 10 with Solutions 6

Table: ADMIN

PCode Name ACode
1001 Male Vice Principal
1009 Female Co-ordinator
1203 Female Co-ordinator
1045 Male HOD
1123 Male Senior Teacher
1167 Male Senior Teacher
1215 Male HOD

(i) Find the primary key of table SCHOOL [1]
(ii) Find the alternative key of table SCHOOL [1]
(iii) Write SQL queries
(a) To display TEACHERNAME, PERIODS of all teachers whose periods are more than 25.
(b) To display all the information from the table SCHOOL in descending order of experience [2]
OR
(iii) (a) To display DESIGNATION without duplicate entries from the table ADMIN
(b) To display TEACHERNAME, CODE and corresponding DESIGNATION from tables SCHOOL and ADMIN of Male teachers.
Answer:
(i) (i)CODE is primary key
(ii) TEACHERNAME is alternative key
(iii) (a) SELECT TEACHERNAME, PERIODS FROM SCHOOL WHERE PERIODS >25;
(b) SELECT * FROM SCHOOL ORDER BY EXPERIENCE DESC;
OR
(iii) (a) SELECT DISTINCT DESIGNATION FROM ADMIN;
(b) SELECT TEACHERNAME, CODE, DESIGNATION FROM SCHOOL, ADMIN WHERE SCHOOL. CODE = ADMIN.CODE AND GENDER = MALE;

Question 35.
Rohit, a student of class 12th, is learning CSV file Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File ‘Student.csv’ (content shown below). Help him in completing the code which creates the desired CSV File.
CSV File
(A) AKSHAY.XILA
(B) ABHISHEK.XII,A
(C) ARVIND.XII,A
(D) RAVI.XILA
(E) ASHISH.XII,A
Incomplete Code

import ________ # Statement -1
fh = open (________ , ________ , newline='') # Statement -2
stuwriter = csv. # Statement -3
data = [ ]
header = ['Roll_No', 'NAME', 'CLASS', 'SECTION']
data. Append (header)
for i in range (5):
roll_no = int (input("Enter Roll Number: "))
name = input ("Enter Name: ")
Class = input ("Enter Class: ")
Section = input ("Enter Section: ")
rec = [ ] # Statement -4
data.append(rec)
stuwriter. ________(data) # Statement -5
fh.close ( )

(i) Write the suitable code for blank space in line marked as Statement-h [1]
(ii) Write the missing code for blank space in line marked as statement-2? [1]
(iii) Write the function name (with argument) that should be used in the blank space of line marked as Statement-3. [2]
Answer:
(i) csv
(ii) “Student.csv”, “w”
(iii) writer(fh). (1 × 4 = 4)