Professional Documents
Culture Documents
Class Xii Computer Sci.
Class Xii Computer Sci.
General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section – I is short answer questions, to be answered in one word or one line.
b. Section – II has two case studies questions. Each case study has 4 case-based sub-
parts. An examinee is to attempt any 4 out of the 5 subparts.
4. Part - B is Descriptive Paper.
5. Part- B has three sections
a. Section-I is short answer questions of 2 marks each in which two question have
internal options.
b. Section-II is long answer questions of 3 marks each in which two questions have internal
options.
c. Section-III is very long answer questions of 5 marks each in which one question has
internal option.
6. All programming questions are to be answered using Python Language only
1 1
How many types of strings are supported in python?
Page 1 of 11
5 What will be the output of the following code? 1
tuple_a=’a’,’b’
tuple_b=(‘a’,’b’)
print(tuple_a==tuple_b)
a) 0
b) 1
c) False
d) True
6 Given the lists L=[10,12,14,20,22,24,30,32,34] , write the output of 1
print(L[0:10:2])
7 1
What will be the output after the following code is executed ?
>>>str=”hello”
>>>str[ : 2 ]
>>>
11 In SQL, name the clause that is used to select values that match any value 1
in a list of specified values.
14 1
Define the use of Telnet in the field of networking
15 Name The transmission media best suitable for fastest communication in LAN 1
Page 2 of 11
a.) list b. )dictionary c.) array d. ) tuple
17 If the following code is executed, what will be the output of the following 1
code?
Msg=”Model Examination 2021”
print(Msg[6:10],Msg[-6:-10])
a) Unique key
b) Foreign key
c) Candidate key
d) Alternate key
21 1
What is meant by Bandwidth ? Give its units
Section-II
Both the Case study based questions are compulsory. Attempt any 4
sub parts from each question. Each question carries 1 mark
Page 3 of 11
Table : studentTb
StdntId StdntName StdntDOB AnnualFee
1002 Sameer 2005-01-06 6000
1003 Bharat 2006-02-07 5000
1005 Alen 2005-11-10 4000
1007 Meera 2004-12-12 7000
1004 John 2007-01-09 4500
1006 Kamal 2006-09-20 6000
1008 Rahim 2004-10-25 5000
(a) Identify the attribute best suitable to be declared as a primary key, 1
(b) Write the degree and cardinality of the table studentTb. 1
(c) Insert the following data into the attributes StdntId , StdntName 1
StdntDOB and AnnualFee respectively in the given table studentTb.
StdntId = 2000, StdntName = Saira, StdntDOB = 2009-12-12 and
AnnualFee= 4500
1
(d) John wants to open database. write the command for it
(e) Now John writes the following SQL command.Based on the given 1
records in studentTb above ,what is the query result?
import # Line 1
Page 4 of 11
newFileWriter = csv.writer(f)
newFileWriter.writerow([ProductName,Price])
f.close()
writeCsvFile(“Laptop Dell”,”5000”)
writeCsvFile (“Macbook”,”8000”)
writeCsvFile(“Mic.Notebook”,”4000”)
readCsvFile() #Line 5
(b) Fill in the blank in Line 2 to open the file to write/add data into the file 1
(c) Fill in the blank in Line 3 to read the data from a csv file. 1
(d) Fill in the blank in Line 4 to close the file. 1
(e) Write the output he will obtain while executing Line 5. 1
Part – B
Section-I
24 Evaluate the following expressions: 2
a) 3**2**2 + 2**3// 5 – 7*5/2
b) 5<10 and 10<8 or not 3<18
Page 5 of 11
27 Differentiate between Global variable and local variable with a suitable 2
example for each.
OR
Explain the use of default parameter in a function with the help of a
suitable example.
import random
N=[20,30,40,50,60,70];
Start =random.randint(1,3)
End =random.randint(2,4)
for a in range(Start, End +1):
print ( N[a],end=”@“)
30 What is the difference between WHERE and HAVING clause of SQL SELECT 2
statement ?Give example.
Page 6 of 11
31 Differentiate between fetchmany() and fetchall() methods with suitable 2
examples for each.
32 2
What do you understand by Candidate Keys in a table? Give a suitable
example of Candidate Keys from a table containing some meaningful data.
33 Find and write the output of the following Python code: 2
Str1 = "EXAM2020"
Str2 = " "
I=0
while I<len(Str1):
if Str1[I]>="A" and Str1[I]<="M":
Str2=Str2+Str1[I+1]
elif Str1[I]>="0" and Str1[I]<="9":
Str2=Str2+ (Str1[I-1])
else:
Str2=Str2+"*"
I=I+1
print(Str2)
Section- II
Page 7 of 11
OR
Example:
If the file content is as follows:
Living a life you can be proud of
I do my best and all of you are doing your best
output as:
i or I : 5 y or Y : 4
36 Write the outputs of the SQL queries (i) to (iii) based on the relations SAMS 3
and VENDOR given below:
Table: SAMS
Page 8 of 11
Table : VENDOR
VCode VName
P01 Satish
P02 Manoj
P03 Subodh
P04 Jacob
OR
Write a function in Python POP(Arr), where Arr is a stack implemented by a
list of numbers. The function returns the value deleted from the stack.
Section-III
38 Global University is setting up its academic blocks at Delhi and is 5
planning to set up a network. The University has 3 academic blocks
and one Human Resource Center as shown in the diagram below:
Page 9 of 11
Law Block to business Block 40m
Law block to Technology Block 80m
Law Block to HR center 105m
Business Block to technology
30m
Block
Business Block to HR Center 35m
Technology block to HR center 15m
Number of computers in each of the blocks/Center is as follows:
Law Block 15
Technology Block 40
HR center 115
Business Block 25
39 Write SQL commands for the following queries (i) to (v) based on the 5
relations Employee and Department given below:
Table : Employee
ENO ENAME SALARY ZONE AGE GRADE DEPT
Page 10 of 11
E3 Nalini 60000 East 26 A 10
E4 Sanaj 65000 South 36 A 20
E5 Surya 58000 North 30 B 30
Table : Department
DEPT DNAME
10 Computers
20 Economics
30 English
OR
A binary file “CUSTOMER.DAT” has structure ( CustNo, CustName,
Balance). Write a function Disprec() in Python that would read contents of
the file “CUSTOMER.DAT” and display the details of those customers whose
Balance is in the range of 400000 and 500000. Also display number of
customers having balance in the range of 400000 and 500000
Page 11 of 11