Computer Science CLS 12
Computer Science CLS 12
Computer Science CLS 12
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
subparts.
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
------------------------------
. PART - A
Section-I
Select the most appropriate option out of the options given for each
question. Attempt any 15 questions from question no 1 to 21.
1. Find odd one out. [1]
(a) String (b) Dictionary (c) Tuple (d) List
2. Write the type of tokens from the following: [1]
(i) if (ii) roll_no
3. A file is opened using following modes that does not exist. In which case it will [1]
result in error?
(a) r (b) a (c) w (d) r+
4. What will be the output of the following code? [1]
8. Name the Python Library modules which need to be imported to invoke the
following functions:
(i) sin() (ii) randint ()
10. _______ looks like a legitimate software and once it tricks a user into installing [1]
it, it acts pretty much like a virus or worm.
11. The SQL keyword ________ is used with wildcards % and _. [1]
13. Which of the following functions ignore the NULL values? [1]
(a) sum (b) max (c) avg (d) All of the above
14. In SQL, which query will display the list of databases on a system? [1]
16. Which of the following expression(s) would result in integer only, if both a and b [1]
are integers?
(a) a % b (b) a // b (c) a / b (d) a / -b
str1 = “ABCD”
s = “@”
print(s.join(str1))
18. What will the degree and cardinality of the following table? [1]
20. Which of the following constraint(s) will not allow a NULL value in a column? [1]
(a) Primary Key (b) Unique (c) Not Null (d) Null
21. Rearrange the following terms in increasing order of area covered. [1]
Section-II
Both the Case study based questions are compulsory. Attempt 5 sub
parts from each question. Each question carries 1 mark
22 Wizard‟s School is considering to maintain their inventory using SQL to store
the data. As a database administer, Vijay has decided that:
Name of the database - School
Name of the table - Student
(i) Write a command to insert Suman‟s record with the data as shown in the [1]
table.
(ii) What will be the most suitable datatype for the grade column and why? [1]
(iii) Which constraint can be used to restrict the maximum marks to 100? [1]
(v) Write command to add one more column class to store class in roman [1]
numeral form. Choose appropriate datatype.
import csv
def VentureCreate(FileName,Rec):
File = open(--------------) #Line1
FN = ['VentureCode', 'Name', 'InvestAmt']
WriterObj = csv.writer(File)
_______________________________ # Line2
for i in range(Rec):
DataRow = input("Enter Data ...").split()
DataRow[2] = int(DataRow[2])
_____________________________ # Line2
File.close()
Data Entered …
FN = “Venture.csv”
R=3
Data …
V101 Blume_Ventures 50000000
V102 Helion_Venture_Partners 45000000
V103 Inventus_Capitalist 300000
Minimum = 500000
Part – B
Section-I
24 What will be the output of the following Python code [2]
for a in range(-1,7,4):
for b in range(2):
print(a,b)
25 What is the difference in functioning of switch and hub? [2]
OR
Explain the concept of IPR. Name any one category of product that is covered
under IPR.
26 Given below is a URL. [2]
https://drive.google.com/drive/u/1/search?q=sql
30 Anil has doubt about Primary Key constraint and Unique constraint. Can you [2]
help him understand what way they are similar and in what way they are
different?
31 Explain any four parameters of connect ( ) function used to integrate MySQL [2]
database with Python.
34 Write a Python method/function SwitchOver(Val) to swap the even and odd [3]
positions of the values in the list Val.
Note : Assuming that the list has even number of values in it.
For example :
If the list Numbers contain
[25,17,19,13,12,15]
After swapping the list content should be displayed as
[17,25,13,19,15,12]
35 Write a method/function BIGWORDS() in Python to read contents from a text file [3]
CODE.TXT to count and display the occurrence of those words, which are
having 5 or more alphabets.
For example :
If the content of the file is
ME AND MY FRIENDS ENSURE SAFETY AND SECURITY OF EVERYONE
The output will be 5
OR
Write a method in Python to read lines from a text MYNOTES.TXT, and display
those lines, which are starting with the alphabet.
37 Write Insert(Place) and Delete(Place) methods in python to add Place and [3]
Remove Place considering them to act as Insert and Delete operations on a List
storing names of cities. Also print the details after every operation in the
ascending order
OR
Section-III
38 Software Development Company has set up its new center at Raipur for its [4]
office and web based activities. It has 4 blocks of buildings named Block A,
Block B, Block C, Block D.
Block Number of
Computers
A 25
B 50
C 125
D 10
(i) Suggest most suitable place to house server of this company with proper
reason.
(ii) Suggest the layout of connection between the blocks and identify the
topology of the layout.
(iii) Suggest the placement of the Modem in the network with justification.
(iv) Suggest the most suitable transmission media to use to connect this center
with Head office located at Delhi economically.
(v) What type of network would be formed when Delhi Centre is connected?
39 Consider the following tables DRESS and MATERIAL. Write SQL commands for [4]
the statements (i) to (iv)
Table: MATERIAL
MCODE TYPE
M001 TERELENE
M002 COTTON
M004 POLYESTER
M003 SILK
Table: DRESS
OR