Class 12 Term 2 Sample Paper Computer Science Set 5
Subject: Computer Science
Subject Code: 083
Class : 12
Maximum Marks: 35 Time: 2 hours
- 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
(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.
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:
a) Convert the following infix notation of expression to an equivalent postfix notation of expression (show status of stack after execution of each operation):
b) Evaluate the following postfix notation of expression (show status of stack after each operation):
5, 6, 2, +,*, 12, 4,/,-
(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.
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.
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.
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”
(Each question carries 4 marks)
11. Consider the following tables and write queries for the following.
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
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|
Number of computers:
|Building||No. of Computers|
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:
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