Professional Documents
Culture Documents
Comp - Sci .
Comp - 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.
4. Part - B is Descriptive Paper.
5. Part- B has three sections
a. Section-I is short answer questions of 2 marks each.
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.
6. All programming questions are to be answered using Python Language only
13 Which clause in SQL provides summarizing results from a table? Write its 1
syntax also.
14 1
What is selection and projection operation used for?
Section-II
Both the case study based questions are compulsory. Attempt any 4 sub parts from each
question. Each question carries 1 mark (8 marks)
16. RWA of Shalimar Bagh plans to start their society library. They plan to 1
maintain their inventory using SQL to store the data. They hire a
database administer, Shresth who does the planning for their library
automation. He decides that :
• Name of the database - RWALIB
• Name of the table - LIBRARY
• The attributes of LIBRARY are as follows:
Code - character of size 5
BookName – character of size 25
Type - character of size 20
Author – character of size 30
a) Write the statement to create the table as per the specifications
given above.
b) Identify the attribute best suitable to be declared as a primary key. 1
Page 2 of 7
c) Insert the following data into the attributes Code, BookName and 1
Type respectively in the given table LIBRARY.
import # Line 1
def add(UserName,per):
# to write / add data into the binary file
f=open(' user.dat,' ') # Line 2
stu=_________________ # Line 3
for i in stu:
if________________: # Line 4
print(i)
____________ # Line 5
23. Define Primary key and foreign key with help of an example. 2
24. Predict the output of the code given below: 2
def run(s):
k=len(s) m=” “
for i in range(0, k):
if (s[i].islower()) :
m = m + s[i].upper() elif
(s[i].isalpha()):
m = m + s[i].lower()
else:
m = m + ‘aa’
print(m) run(‘sCHOOL2@Com’)
30. Write the outputs of the SQL queries (i) to (iii) based on the relations 3
Worker and Paylevel given below:
Page 4 of 7
Table: WORKER
ECODE NAME DESIG PLEVEL DOJ DOB
11 Sachin Supervisor P001 13-Sep- 2004 23-Aug-1985
Patel
12 Chander Operator P003 22-Feb-2010 12-Jul-1987
Nath
13 Fizza Operator P003 14-Jun-2009 14-0ct-1983
15 Ameen Mechanic P002 21-Aug-2006 13-Mar-1984
Ahmed
18 Sanya Clerk P002 19-Dec-2005 09-Jun-1983
Table: PAYLEVEL
31. Write a function in Python PUSH(Arr), where Arr is a list of numbers. From 3
this list push all numbers divisible by 5 into a stack implemented by using a
list. Display the stack if it has at least one element, otherwise display
appropriate error message.
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.
Admin Training
Transport Academic
Admin to Training 50 m
Training to Academic 70 m
Page 5 of 7
Academic to Admin 125 m
Training to Transport 80 m
Admin to Transport 175 m
Academic to Transport 90 m
Number of computers
Academic 50
Training 30
Admin 150
Transport 15
(i) Suggest the most suitable connection between the Wings and
topology.
(ii) Suggest the most suitable place (i.e., Wing) to house the server of this
organization with a suitable reason, with justification.
(iii) Suggest the placement of the following devices with justification:
(a) Repeater
(b) Hub/Switch
(iv) The organization is planning to link its head office situated in Delhi with
the offices at Agra. Suggest an economic way to connect it; the company is
ready to compromise on the speed of connectivity. Justify your answer.
(v) Name the device to be installed to avoid any unauthorized access to the
data in network.
33. A binary file “STUDENT.DAT” has structure (admission_number, Name, 5
Percentage). Write a function countrec() in Python that would read
contents of the file “STUDENT.DAT” and display the details of those
students whose percentage is above 75. Also display number of students
scoring above 75%
Page 6 of 7
34. Write SQL queries for (i) to (iii) and output for SQL queries (iv) to (v), 5
which are based on the table: STUDENT given below:
(i) To display Name, Class and total number of students who have
secured more than 450 marks, class wise.
(ii) To increase marks of all students by 20 whose class is “XII”
(iii) SELECT COUNT(*), City FROM STUDENT GROUP BY CITY HAVING
COUNT(*)>1;
(iv) SELECT MAX(DOB),MIN(DOB) FROM STUDENT;
(v) SELECT NAME,GENDER FROM STUDENT WHERE CITY=”Delhi”;
Page 7 of 7