You are on page 1of 4

KENDRIYA VIDYALAYA SANGATHAN

SAMPLE PAPER
PRE BOARD EXAMINATION 2021-22
XII COMPUTER SCIENCE TERM-II
Maximum Marks: 35 Time: 2 hours
General Instructions
• The question paper is divided into 3 sections – A, B and C
• Section A, consists of 7 questions (1-7). Each question carries 2 marks.
• Section B, consists of 3 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 and 12.

Section 'A'
each question carries 2 marks
1. What do mean by 'LIFO' property of Stack? What is 'PUSH' and 'POP' in stack? 2
2. Give full form of 2
HTTP , FTP
3. (i) Which of the following is privately owned and links the devices in a 2
single office, building or campus?
(LAN, MAN, WAN)
(ii) Which topology uses a single cable which connects all the including
nodes?
(STAR, BUS, RING)
4. Differentiate between 'INT' and 'FLOAT' data type with respect to databases? 2
5. A resultset is extracted from the database using the cursor object (that has 2
been already created) by giving the following statement.

Mydata=cursor.fetchone()
(a) How many records will be returned by fetchone() method?
(b) What will be the datatype of Mydata object after the given command is
executed?
6. Write the output of the queries (i) to (iv) based on the table, 'COURSE' given 2
below:
CourseID CourseName CourseFee Discount
M001 MBA 60000 5
B002 BPHARM 66000 2
D003 DPHARM 50000 3
BT04 BTECH 55000 10
MT05 MTECH 45000 10
B006 BED 35000 15
PE07 MPED 28000 5

[1]
i) SELECT SUM(DISCOUNT) FROM COURSE
WHERE COURSEFEE>48000;

ii) SELECT MIN(COURSEFEE) FROM COURSE;

iii) SELECT * FROM COURSE WHERE DISCOUNT>5 AND COURSEID LIKE "B%";

iv) SELECT COURSENAME, COURSEFEE FROM COURSE


WHERE DISCOUNT>9;
7. Write command to view 2
i) List of databases
ii) List of tables
SECTION – B
Each question carries 3 marks
8. Priyasha has created a dictionary containing brand and price as key value pairs 3
of 6 mobiles. Write a program, with separate user defined functions to perform
the following operations:
● Push the keys (brand of the mobile) of the dictionary into a stack, where the
corresponding value (price) is greater than 15000.
● Pop and display the content of the stack.
For example:
If the sample content of the dictionary is as follows:
R={"NOKIA":17600, "VIVO":8500, "MI":8900, "SAMSUNG":16500, "LG":9600,
"MOTO":18300}
The output from the program should be:
NOKIA SAMSUNG MOTO
OR
Vikas has a list containing 10 integers. You need to help him create a program
with separate user defined functions to perform the following operations
based on this list.
● Traverse the content of the list and push the odd numbers into a stack.
● Pop and display the content of the stack.

For Example:
If the sample Content of the list is as follows:
N=[12, 13, 34, 56, 21, 79, 98, 22, 35, 38]
Sample Output of the code should be:
23 21 79 35

9. i) A table, ITEM has been created in a database with the following fields: 1
ITEMCODE, ITEMNAME, QTY, PRICE, DISCOUNT
Give the SQL command to remove field, ‘DISCOUNT’ of ‘ITEM’ table.

[2]
ii) Categorize following commands into DDL and DML commands? 2
INSERT INTO, DROP TABLE, ALTER TABLE, UPDATE...SET
10. Vaibhav want’s to create a table with the following specifications. Help him by 3
writing the correct command in SQL.

Table name : PRODUCTS

ATTRIBUTES Data Type Constraint


PID INTEGER PRIMARY KEY
PNAME VARCHAR(30) NOT NULL
COST FLOAT
DOP DATE
WEIGHT INTEGER DEFAULT 10
Section C
Each question carries 4 marks
11. Write queries (a) to (d) based on the tables KIDS and CHOCOLATE given below: 4
Table : KIDS
CODE KIDNAME AGE CHOKOID GRADE
1001 MONU 5 CH621 1
1002 SONU 6 CH765 1
2001 TINU 7 CH356 2
2003 MEENA 7 CH356 2
3005 JAYA 8 CH356 3
3007 RIYA 9 CH765 3

Table : CHOCOLATE
CHOKOID NAME PRICE
CH235 PERK 20
CH356 MUNCH 15
CH467 KINDER 30
CH621 KISMI BAR 5
CH765 ECLAIRS 2

(a) To display total students assigned to each chocolate. (chocolate wise no of


students)
(b) To display kidname and chocolate name of each kid whose age is more than 6.
(c) Show the CHOKOID from KIDS table without repetition.
(d) To show the KIDNAME, AGE and GRADE where KIDNAME in alphabetical
order.
12. i) Give two advantages and two disadvantages of bus topology 2
OR
Define the following terms:
Web Browser , Web Server
[3]
ii) Explain about 2
1. HTML
2. URL
3. WWW
4. HTTPS
13. BeHappy Corporation has set up its new centre at Noida, Uttar Pradesh
for its office and web-based activities. It has 4 blocks of buildings.

Distance between the various blocks is as follows:


A to B 40 m
B to C 120m
C to D 100m
A to D 170m
B to D 150m
A to C 70m
Numbers of computers in each block
Block A – 25
Block B - 150
Block C - 125
Block D - 10
(a) Suggest and draw the cable layout to efficiently connect various blocks of buildings 1
within the Noida centre for connecting the digital devices.
(b) Suggest the placement of the following device with justification 1
i. Repeater
ii. Hub/Switch

(c) Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is 1
connected to its head office in Mumbai?
(d) Which fast and very effective wireless transmission medium should preferably be 1
used to connect the head office at Mumbai with the centre at Noida?

[4]

You might also like