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

CATCODENAMEPRICEQTY
Beverage163Best Juice10.010
SnackS968Yummy12.240
NoodleN042WOW20.220
BeverageB482Fresh Tea25.980
NoodleN091QQ noodle8.450

 

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

CIDNAMECITYPRODUCTNAME
111SONYDELHITV
222NOKIAMUMBAIMOBILE
333ONIDADELHITV
444SONYMUMBAIMOBILE
555BLACKBERRYMADRASMOBILE
666DELLDELHILAPTOP

 

Table: CUSTOMER

CUSTIDNAMEPRICEQTYCID
101Rohan Sharma7000020222
102Deepak Kumar5000010666
103Mohan Kumar300005111
104Sahil Bansal350003333
105Neha Soni250007444
106Sonal Aggarwal200005333
107Arjun Singh5000015666

 

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_IDCUST_NAMECUST_PHONE
C011Akhilesh Narang56478969
C012Sumedha Madaan87432980
C013Shivani Singhal90065327

 

Table: BILL

BILL_NOCUST_IDNO_OF_ITEMSDEL_DATEAMOUNT
3010C012202015-09-2155000
3011C013702015-10-24185000
3012C011452015-11-26105000
3013C013302015-12-2872000

 

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 1Building 2Distance in meters
MainAdmin50
MainFinance100
MainAcademic70
AdminFinance50
FinanceAcademic70
AdminAcademic60

 

Number of computers:

BuildingNo. of Computers
Main150
Admin75
Finance50
Academic60

 

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

 

 

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