(General Instructions)
Please check that this question paper contains 8 printed pages.
Please check that this question paper contains 35questions.
Please write down the serial number of the question before attempting it.
Reading time of 15 minutes is given to read the question paper alone. No writing during this time.
This question paper contains five sections, Section A to E.
All questions are compulsory.
Section A has 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 02 Long Answer type questions carrying 04 marks each.
Section E has 03 questions carrying 05 marks each. One internal choice is
given
All programming questions are to be answered using Python Language only.
COMMON EXAMINATION-2024
Class-12
(COMPUTER SCIENCE 083)
Roll No.: Maximum Marks:70
Date: / / Time allowed: 3 hours
SECTION A
1 s="hello" 1
print(s.index('a'))
in the above code what will be the exception that is thrown ?
2 Which of the following is the valid variable name? 1
(a) f %2 (b) 20ans (c) ans (d) $ans
3 Given tp = (1,2,3,4,5,6). Which of the following two statements will give the same output? 1
1. print(tp[:-1]) 3.print(tp[0:5])
2. print(tp[0:4]) 4. print(tp[-4:])
(a) Statement 1 and 2 (b)Statement 2 and 4
(c ) Statement 1 and 4 (d)Statement 1 and 3
4 l=[0,True,False,1] 1
l.sort(reverse=1)
print(l)
5 Select the correct output of the code: 1
Str=“Computer”
Str=Str[-4:]
print(Str*2)
a. Uter b. uterretu c.uteruter d.None of these
6 Name the file attribute to check whether the file is closed or not ? 1
7 Fill in the blank 1
command is used to modify the attribute datatype or size in a table structure.
8 The following SQL is which type of join: 1
select customer.cust_id,order.cust_id,name, order_id from customer, order;
, CHENNAI SAHODAYA SCHOOLS COMPLEX
11 A text file student.txt is stored in the storage device. Identify the correct option out of the 1
following options to open the file in read mode.
i. myfile = open('student.txt','rb')
ii. myfile = open('student.txt','w')
iii. myfile = open('student.txt','r')
iv. myfile = open('student.txt')
a) only (i) b) both (i) and (iv ) c) both (iii) and (iv) d) both (i) and (iii)
12 Fill in the blank: 1
A database is a special control structure that facilitates the row by row processing
of records in the resultset.
(a) fetch b)table c) cursor d)query
13 Fill in the Blank 1
is the networking device that connects computers in a network by using
packet switching to receive, and forward data to the destination.
14 Predict the output of the following code 1
l=['1','2','3']
m=str(l)
print(m)
print(m.find('2'))
15 The language used in application programs to request data from the DBMS is referred to as the 1
-------------------.
16 To create a connection between MYSQL database and Python application connect() function 1
is used. Which of the following are mandatory arguments required to connect any database
from Python.
a) Username, Password, Hostname, Database Name, Port
b) Username, Password, Hostname
c) Username, Password, Hostname, Database Name
d) Username, Password, Hostname, Port
Q17 and 18 are ASSERTION AND REASONING based questions. 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 the correct explanation for A
c) A is True but R is False
d) A is false but R is True
17 Assertion (A):- All the keyword arguments passed must match one of the arguments accepted by 1
the function
Reasoning (R):- You cannot change the order of appearance of the keyword.
18 Assertion (A): CSV file is a human readable text file where each line has a number of fields, 1
separated by commas or some other delimiter.
Reason (R): writerow() function can be used for writing into writer object.
SECTION B
Amit is trying to write a program to find the factorial of a number passed to the function and he 2
19 has written the following code but it’s not working and producing errors. Help Amit to correct this
and rewrite the corrected code. Also underline the corrections made.
Def fact(num):
factorial = 1
if num < 0:
print("Sorry, factorial does not exist for negative numbers")
else num == 0
print("The factorial of 0 is 1")
else:
for i in range(1,num + 1):