Class 12 Term 2 Sample Paper Computer Science Set 6

Last updated on March 16th, 2022 at 02:56 pm

Class 12 Term 2 Sample Paper Computer Science Set 6

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. Give full form of – HTTP , FTP

3. (i) Which of the following is privately owned and links the devices in a single office, building or campus?

(LAN, MAN, WAN)

3. (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?   

5. A resultset is extracted from the database using the cursor object (that has been already created) by giving the following statement.

Mydata=cursor.fetchone()

i) How many records will be returned by fetchone() method?

ii) 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 below: 

CourseIDCourseNameCourseFeeDiscount
M001MBA600005
B002BPHARM660002
D003DPHARM500003
BT04BTECH5500010
MT05MTECH4500010
B006BED3500015
PE07MPED280005

 

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- 

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 of 6 mobiles. Write a program, with separate user defined functions to perform the following operations: 

i) Push the keys (brand of the mobile) of the dictionary into a stack, where the corresponding value (price) is greater than 15000.

ii) 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. 

i) Traverse the content of the list and push the odd numbers into a stack.

ii) 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: 

ITEMCODE, ITEMNAME, QTY, PRICE, DISCOUNT

Give the SQL command to remove field, ‘DISCOUNT’ of ‘ITEM’ table.

9. (ii) Categorize following commands into DDL and DML commands.

INSERT INTO, DROP TABLE, ALTER TABLE, UPDATE. SET

 

10. Vaibhav want to create a table with the following specifications. Help him by writing the correct command in SQL. 

Table name : PRODUCTS

ATTRIBUTESData TypeConstraint
PIDINTEGERPRIMARY KEY
PNAMEVARCHAR(30)NOT NULL
COSTFLOAT
DOPDATE
WEIGHTINTEGERDEFAULT 10

 

Section C

Each question carries 4 marks

 

11. Write queries (a) to (d) based on the tables KIDS and CHOCOLATE given below:

Table : KIDS

CODEKIDNAMEAGECHOKOIDGRADE
1001MONU5CH6211
1002SONU6CH7651
2001TINU7CH3562
2003MEENA7CH3562
3005JAYA8CH3563
3007RIYA9CH7653

 

Table : CHOCOLATE

CHOKOIDNAMEPRICE
CH235PERK20
CH356MUNCH15
CH467KINDER30
CH621KISMI BAR5
CH765ECLAIRS2

 

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

ii) To display kidname and chocolate name of each kid whose age is more than 6.

iii) Show the CHOKOID from KIDS table without repetition.

iv) To show the KIDNAME, AGE and GRADE where KIDNAME in alphabetical order.

 

12. (i) Give two advantages and two disadvantages of bus topology.

OR

Define the following terms: Web Browser, Web Server

12. (ii) Explain the following.

a) HTML

b) URL

c) WWW

d) 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.

 

BeHappy

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       

 

i) Suggest and draw the cable layout to efficiently connect various blocks of buildings within the Noida centre for connecting the digital devices. 

ii) Suggest the placement of the following device with justification. 

a) Repeater

b) Hub/Switch

iii) Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is connected to its head office in Mumbai?

iv) Which fast and very effective wireless transmission medium should preferably be used to connect the head office at Mumbai with the centre at Noida?

Copywrite © 2020-2025, CBSE Python,
All Rights Reserved