Class 12 Term 2 Sample Paper Computer Science Set 5

Class 12 Term 2 Sample Paper Computer Science Set 5

Subject: Computer Science

Subject Code: 083

Class : 12

Maximum Marks: 35 Time: 2 hours

General Instructions

  • The question paper divided into 3 Sections A, B and C.
  • Section A, consist of 07 Questions (1-7). Each question carries 2 marks
  • Section B consist of 03 Cuestions (8-10). Each piestion carries 3 marks.
  • Section C, consist of 3 questions (11-13) Each question carries 4 marks
  • Internal choices have been given for question numbers-7,9 and 12

 

SECTION A

(Each question carries 2 marks)

 

1. What is Data structure? Explain the classification of Data structure.

 

2. What is the difference between bit rate and baud rate and Message Switching and Packet Switching?

 

3. What are the types of Transmission media ? Explain the types in short.

 

4. A resultset is extracted from the database using the cursor object (that has 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?

 

5. Write a Python database Connectivity script that deletes record from Student table of database Student have Sname starts from “P”.

 

6. Differentiate between DDL and DML commands with examples.

 

7. a) Evaluate the following postfix notation of expression (show status of stack after each operation)

True, False, NOT, OR, False, True, OR, AND

 

b) Convert the following infix expression into postfix notation and show the contents of stack after each operation:

Q=A+B*C^(D/E)/F

OR

a) Convert the following infix notation of expression to an equivalent postfix notation of expression (show status of stack after execution of each operation):

A*(B+(C+D)*(E+F)/G) *H

 

b) Evaluate the following postfix notation of expression (show status of stack after each operation):

5, 6, 2, +,*, 12, 4,/,-

 

SECTION B

(Each question carries 3 marks)

 

8. Mr. Vivaan is responsible for setting up an inventory system in a supermarket. He creates a database table, Inventory, to store the information on product for sale.

Table: Inventory

CAT CODE NAME PRICE QTY
Beverage 163 Best Juice 10.0 10
Snack S968 Yummy 12.2 40
Noodle N042 WOW 20.2 20
Beverage B482 Fresh Tea 25.9 80
Noodle N091 QQ noodle 8.4 50

 

a) Which Field, CAT CODE NAME, PRICE and QTY, should be used as a key field.

b) The data type of QTY is integer, Aditi, Mr. Vivian’s colleague, suggests changing it to real number or string Mr. Vivaan disagrees with Aditi’s suggestion. Why?

c) Mr. Vivaan write the following SQL command, Based on the five given records in Inventory above. What is the query result?

Select CODE, PRICE from Inventory where PRICE>10 and QTY < 40;

 

9. Write a function in Python, INSERTQ(Arr, City) and DELETEQ(Arr) for performing insertion and deletion operations in a Queue. Arr is the list used for implementing queue and City is the Name to be inserted.

OR

Write AddCustomer( ) and DeleteCustomer() methods Python to add a new Customer and delete a Customer from a list of CustomerNames, considering them to act as push and pop operations of the stack data structure.

 

10. Write the output for the following SQL commands based on a table COMPANY and CUSTOMER.

Table: COMPANY

CID NAME CITY PRODUCTNAME
111 SONY DELHI TV
222 NOKIA MUMBAI MOBILE
333 ONIDA DELHI TV
444 SONY MUMBAI MOBILE
555 BLACKBERRY MADRAS MOBILE
666 DELL DELHI LAPTOP

 

Table: CUSTOMER

CUSTID NAME PRICE QTY CID
101 Rohan Sharma 70000 20 222
102 Deepak Kumar 50000 10 666
103 Mohan Kumar 30000 5 111
104 Sahil Bansal 35000 3 333
105 Neha Soni 25000 7 444
106 Sonal Aggarwal 20000 5 333
107 Arjun Singh 50000 15 666

 

a) SELECT COUNT(*) CITY FROM COMPANY GROUP BY CITY;

b) SELECT MIN(PRICE), MAX(PRICE) FROM CUSTOMER WHERE QTY 10 and NAME LIKE “%r%;

c) SELECT PRODUCTNAME,CITY, PRICE FROM COMPANY CUSTOMER WHERE COMPANY.CID-CUSTOMER CID AND PRODUCTNAME=”MOBILE”

 

SECTION C

(Each question carries 4 marks)

11. Consider the following tables and write queries for the following.

Table: CUSTOMER

CUST_ID CUST_NAME CUST_PHONE
C011 Akhilesh Narang 56478969
C012 Sumedha Madaan 87432980
C013 Shivani Singhal 90065327

 

Table: BILL

BILL_NO CUST_ID NO_OF_ITEMS DEL_DATE AMOUNT
3010 C012 20 2015-09-21 55000
3011 C013 70 2015-10-24 185000
3012 C011 45 2015-11-26 105000
3013 C013 30 2015-12-28 72000

 

a) Remove the details of items purchased before November 2015, with amount less than 30000.

b) Increase the Amount by 12% for all the items with number of items more than 40.

c) How many rows and how many columns will be there in t Cartesian product of these two tables?

d) Change the name of the column NO OF ITEMS as Quantity.

 

12.a) Define the following terms: Switch, Router

OR

Bridges, Gateways

 

b) Expand the following and define them: TDMA and NIC

 

13. Sanskar University of Himachal Pradesh is setting up a secured network for its campus at Himachal Pradesh for operating their day-to-day office & web hased activities. They are planning to have network connectivity between for buildings, Answer the question (a) to (d) after going through the building positions in the campus & other details which are given below:

 

The distances between various buildings of university are given as

Building 1 Building 2 Distance in meters
Main Admin 50
Main Finance 100
Main Academic 70
Admin Finance 50
Finance Academic 70
Admin Academic 60

 

Number of computers:

Building No. of Computers
Main 150
Admin 75
Finance 50
Academic 60

 

As a network expert, you are required to give best possible solutions for the given queries of the university administration:

a) Suggest cable layout for the connections between the various buildings,

b) Suggest the most suitable building to house the server of the network of the university.

c) Suggest the placement of following devices with justification:

i) Switch/Hub

ii) Repeater

 

d) Suggest the technology out of the following for setting-up very fast Internet connectivity among buildings of the university.

i) Optical Fibre

ii) Coaxial cable

iii) Ethernet Cable

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *