[go: up one dir, main page]

0% found this document useful (0 votes)
146 views5 pages

SQP - Term 2 - Set 2 - C S - XII

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 5

KVS RO ERNAKULAM

SAMPLE PAPER-TERM II
COMPUTER SCIENCE (083)
CLASS – XII
TIME: 2 HRS. MAX MARKS: 35
General Instructions
The question paper is divided into 3 sections – A, B and C
∙ Section A, consists of 8 questions (1-7). Each question carries 2 marks.
∙ Section B, consists of 4 questions (8-10). Each question carries 3 marks.
∙ Section C, consists of 3 questions( 11-13). Each question carries 4 marks.
∙ Internal choices have been given for question numbers – 7,8,12
SECTION-A
(Each question carries 2 marks)
Q. Part
No .No
1 Show the Stack’s status after each of the following operations. Show position of top by 2
underlining the element.Stack s is initially empty.
i)s.push(10) ii)s.push(20)
iii)s.pop() iv)s.push(15)
v)s.push(20)
2 (i) Expand the following: 1
NIC,ARPANET
(ii) Which of the following is omnidirectional? 1
Infrared, Microwave, Radio wave
3 Differentiate between order by and group by with example. 2
4 The ‘STUDENT’ table is stored in the database ‘SCHOOL’ in MySQL. The database 2
credentials include host as ‘localhost’, user as ‘root’ and password as ‘cloud’. Write
python script to do the following:

● Import necessary modules to establish MySQL connectivity with Python


● Write a statement to establish connection to the database using given credentials.

5 Consider the following table ITEM 2


PRICE NAME
20 BOOK
4 PENCIL
15 PEN
5 ERASER
30 PEN

Write the output for the following queries :


a)Select SUM(PRICE) from ITEM where Name LIKE ‘P%’;
b)Select * from ITEM wherePRICE IN ( 4,20);
c)Select COUNT(DISTINCT NAME) FROM ITEM;
d)Select MAX(PRICE) as HIGHEST PRICE FROM ITEM;
6 (i) Which command is used to open a database? 2

(ii) Which keyword is used to eliminate duplicate values in a column while displaying?

1
7 Consider the following table Student. 2
SUBJECT MARK
CS 25
MATHS 30
PHYSICS 25
ENGLISH 36
CHEMISTRY 29

a)Write Cardinality and degree of the above table.


b)Insert a new row to the table Student.

OR
a)Update the mark of ENGLISH as 30 using SQL Command.
b)Write SQL command to display details like data types,name of column,constraints etc.
of a table.

SECTION -B
Each question carries 3 marks
8 Mr.Ajay has created a list of elements. Help him to write a program in python with 3
functions, PushEl(element) and PopEl(element) to add a new element and delete an
element from a List of element Description, considering them to act as push and pop
operations of the Stack data structure . Push the element into the stack only when the
element is divisible by 4.

For eg:if L=[2,5,6,8,24,32]


then stack content will be 32 24 8
OR
Ms.Suparna has created a dictionary containing employee IDs and salaries as key value
pairs of 10 employees. Write a program to perform the following operations using
separate user defined functions.
● Push the keys (IDs) of the dictionary into the stack, if the corresponding salary is
>30000.
● Pop and display the content of the stack
For eg:if D={1101:34000,1201:23000,1190:40000}
Then output will be 1190 1101
9 (i)

Table:SalesPesron
SID OrderId Area

S0010 O101 TVM

S0010 O103 KLM

S0014 O104 PKD

2
a)Suggest the foreign key for the table SalesPerson.
b)Name the data types of the columns OrderDate and OrderAmount .

(ii) Differentiate between having and where clause. 1


10 Mr.Sandeep is working as Database Administrator .He designs the following database 3
table to store the information on candidates who register for examination.
Table:Candidates

Field Name Data Type Remarks

CNO Char(8) Candidate Number

CNAME varchar(30) Name of candidate

DOB Date Date of Birth of Candidate


i) Help him to identify the primary key of the table 1
ii) Write SQL command to create the above table. Also mention the advantage of using 2
varchar data type over char data type for storing names.
SECTION C
Each question carries 4 marks
11 Study the following tables DOCTOR and SALARY and write SQL commands for the
questions (a) to (d)
Table: DOCTOR
ID NAME DEPT SEX EXPERIENCE
109 Mehul MEDICINE F 9
105 Jonson ORTHOPEDIC M 10
117 Lucy ENT F 3
111 Becon MEDICINE F 10
130 Morphy ORTHOPEDIC M 15
TABLE:SALARY
ID BASIC ALLOWANCE CONSULTATION
101 12000 1000 300
104 23000 2300 500
107 32000 4000 500
114 12000 5200 100
109 42000 1700 200

4
(a) Display NAME of all doctors who are in “MEDICINE” and having more than 10
years experience from table DOCTOR.
3
(b) Display the average salary of all doctors working in “ENT” department using
the tables DOCTOR and SALARY. Salary=BASIC+ALLOWANCE.
(c) To display total number of lady doctors.
(d) To display department wise maximum year of experience.

12 (i) Write the function of following devices 2


a)Modem b)Switch
OR
How is XML differ from HTML?

(ii) Compare LAN,MAN,WAN 2

13 The NEW INDIA Organization has set up its new Branch at Mizoram for its office and
web based activities .It has 4 wings to building as shown in the diagram

Center to center distance between various blocks

Wing X To Wing Z 40 m

Wing Z To Wing Y 60 m

Wing Y To Wing X 135 m

Wing Y To Wing U 110 m

Wing X To Wing U 165 m

Wing Z To Wing U 90 m

Number of computers

Wing X 50

Wing Z 130

Wing Y 40

Wing U 15

(i) Suggest a suitable layout of connection between the wings and topology.
(ii) Suggest a suitable place (i.e. wing) to house the server of this organization with a
suitable reason with justification.
4
(iii) Suggest the placement of the following devices with justification.
(a)Repeater (b) Hub/Switch

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

 Co-axial cable

 Ethernet cable

 Single pair telephone cable

You might also like