Solved Sample Question Paper Computer Science Class 12 Term 2

Solved CBSE SQP (Sample Question Paper) Class 12 Computer Science (Python) Term 2 exam 2022. This sample question paper has been taken from the official CBSE site and solved by experts.

Sample Question Paper
COMPUTER SCIENCE (Code: 083)
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.

Q. 1 : Give any two characteristics of stacks

Answer:
1.It follows LIFO (Last in First out)
2.The insertion and deletion happen on the same end , from the top of stack.

2.(i) Expand the following:
SMTP , XML

Answer:
SMTP- Simple Mail Transfer Protocol
XML- Extensible Markup Language

(ii) Out of the following, which is the fastest wired and wireless medium of transmission?
Infrared, coaxial cable, optical fibre,
microwave, Ethernet cable

Answer:
Wired: Optical fibre
Wireless: Microwave

Q3. Differentiate between char(n) and varchar(n) data types with respect to databases.

Answer:
Char(n):

  • Used to store fixed length char from 1 to 255 characters.
  • If the data has more than 255 characters then variably space is increased to store the data.

Varchar(n):

  • Stores the data variably. No space is wasted.
  • Maximum length is specified. The data will not be added after its limit.

Q4. 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?
Answer:
One record

(b) What will be the datatype of Mydata object after the given command is executed?
Answer: Tuple

Q.5.Write the output of the queries (a) to (d) based on the table,

Solved CBSE SQP (Sample Question Paper) Class 12 Computer science with Python Term 2


(a) SELECT SUM(DISCOUNT)
FROM FURNITURE
WHERE COST>15000;
Answer: 29

(b) SELECT MAX(DATEOFPURCHASE)
FROM FURNITURE;
Answer: 19-Jul-2021

(c) SELECT * FROM FURNITURE
WHERE DISCOUNT>5 AND FID LIKE “T%”;
Answer:

Solved CBSE SQP (Sample Question Paper) Class 12 Computer science with Python Term 2

(d) Answer:
10-MAR-2020
17-NOV-2021

Q.6.(i) Which command is used to view the list of tables in a database?

Answer:
SHOW TABLES;

(ii) Give one point of difference between an equi-join and a natural join.

Answer:
Equi Join is a join using one common column.
Natural Join is an implicit join clause based on the common columns in the two tables being joined.

Solved CBSE SQP (Sample Question Paper) Class 12 Computer science with Python Term 2
Solved CBSE SQP (Sample Question Paper) Class 12 Computer science with Python Term 2

Answer:
(a) Degree: 5  Cardinality: 6
(b) MOVIEID should be made the primary key as it uniquely identifies each record of the table

Solved CBSE SQP (Sample Question Paper) Class 12 Computer science with Python Term 2

Answer:
(a) MOVIEID and TITLE 
(b) MOVIEID

Q.8.Julie has created a dictionary containing names and marks as key value pairs of 6 students. Write a program, with separate user defined functions to perform the following operations:
● Push the keys (name of the student) of the dictionary into a stack, where the corresponding value (marks) is greater than 75.
● Pop and display the content of the stack.
For example: If the sample content of the dictionary is as follows: R={“OM”:76, “JAI”:45, “BOB”:89, “ALI”:65, “ANU”:90, “TOM”:82}
The output from the program should be: TOM ANU BOB OM

Q.8.Julie has created a dictionary containing names and marks as key value pairs of 6 students. Write a program, with separate user defined functions to perform the following operations:
● Push the keys (name of the student) of the dictionary into a stack, where the corresponding value (marks) is greater than 75.
● Pop and display the content of the stack.
For example: If the sample content of the dictionary is as follows: R={"OM":76, "JAI":45, "BOB":89, "ALI":65, "ANU":90, "TOM":82}
The output from the program should be: TOM ANU BOB OM

OR 
Q.8.Alam 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 even 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:  38 22 98 56 34 12
Answer:

Alam 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 even 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:  38 22 98 56 34 12

Solved CBSE SQP (Sample Question Paper) Class 12 Computer science Term 2

Q.9. (i) A table, ITEM has been created in a database with the following fields:
ITEMCODE, ITEMNAME, QTY, PRICE
Give the SQL command to add a new field, DISCOUNT (of type Integer) to the ITEM table.

(ii) Categorize following commands into DDL and DML commands?
INSERT INTO, DROP TABLE, ALTER TABLE,
UPDATE…SET

Answer: (i)   ALTER TABLE Item      
ADD (Discount INT);

Answer: (ii ) DDL: DROP TABLE, ALTER TABLE       
DML: INSERT INTO, UPDATE.

Q.10.Charu has to create a database named MYEARTH in MYSQL. She now needs to create a table named CITY in the database to store the records of various cities across the globe. The table CITY has the following structure:

Table: CITY

FIELD NAMEDATA TYPEREMARKS
CITYCODECHAR(5)Primary Key
CITYNAMECHAR(30)
SIZEINTEGER
AVGTEMPINTEGER
POLLUTIONRATEINTEGER
POPULATIONINTEGER

Help her to complete the task by suggesting appropriate SQL commands.

Answer:
CREATE DATABASE MYEARTH; 
CREATE TABLE CITY 
(   CITYCODE CHAR(5)PRIMARY KEY,  CITYNAME CHAR(30), SIZE INT, AVGTEMP INT, POPULATIONRATE INT,     POPULATION INT );

Q.11.Write queries (a) to (d) based on the tables EMPLOYEE and DEPARTMENT given below:

 Table: EMPLOYEE

EMPIDNAMEDOBDEPTIDDESIGSALARY
120Alisha23- Jan1978D001Manager75000
123Nitin10- Oct1977D002AO59000
129Navjot12- Jul1971D003Supervisor40000
130Jimmy30- Dec1980D004Sales Rep
131Faiz06- Apr1984D005Dep Manager65000

Table: DEPARTMENT

DEPTIDDEPTNAMEFLOORNO
D001Personal4
D001Admin10
D001Production1
D001Sales3

(a) To display the average salary of all employees, department wise. 
(b) To display name and respective department name of each employee whose salary is more than 50000.
(c) To display the names of employees whose salary is not known, in alphabetical order
(d) To display DEPTID from the table EMPLOYEE without repetition.

Ans(a) SELECT AVG(SALARY)
FROM EMPLOYEE 
     GROUP BY DEPTID;

Ans(b) SELECT NAME, DEPTNAME 
      FROM EMPLOYEE, DEPARTMENT 
      WHERE 
           EMPLOYEE.DEPTID= 
                     DEPARTMENT.DEPTID 
            AND SALARY>50000; 

Ans(c) SELECT NAME FROM EMPLOYEE 
    WHERE SALARY IS NULL 
      ORDER BY NAME; 

Ans(d) SELECT DISTINCT DEPTID 
      FROM EMPLOYEE;

Q.12.Give two advantages and two disadvantages of star topology
OR
Define the following terms:
www , web hosting

Answer:

  • It is very reliable – if one cable or device fails then all the others will still work
  • It is high-performing as no data collisions can occur
  • Less expensive because each device only need one I/O port and wishes to be connected with hub with one link.
  • Easier to put in
  • Robust in nature

OR

Answer:
www: a set of protocols that allow you to access any document on the internet through the naming systems based on URLs. 
Web hosting: Web hosting is a service that allows organizations and individuals to post a website or web page onto the server, which can be viewed by everyone on the Internet.

Q.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 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 – 50 
Block C – 125 
Block D – 10

(a) Suggest and draw the cable layout to efficiently connect various blocks of buildings within the Noida centre for connecting the digital devices.
(b) Suggest the placement of the following device with justification 
i. Repeater 
ii. Hub/Switch
(c) Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is connected to its head office in Mumbai?
(d) Which fast and very effective wireless transmission medium should preferably be used to connect the head office at Mumbai with the centre at Noida?

Answer: (a)

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

Ans (b) : Repeater: between C and D as the distance between them is 100 mts. 
Hub/ Switch: in each block as they help to share data packets within the devices of the network in each block 
Ans (c) : WAN
Ans (d) : Satellite

Thank you, for learning from Solved CBSE SQP (Sample Question Paper) Class 12 Computer science(Python) Term 2.There are other sample papers click below :

Sample Question Paper CBSE Class 12 Term 2 – Computer Science (Python) PDF from official website

Practice Set Computer Science Class 12 Term 2 Exam 2022 – CS Study

Leave a Comment

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