CS - MOCK TEST PAPER - Term II 2022 - V4
CS - MOCK TEST PAPER - Term II 2022 - V4
MOCK TEST-2022
COMPUTER
SCIENCE
WITH CBSE SAMPLE PAPER
As per the CBSE Revised Rationalized Curriculum of Computer Science code (083)
and Circular No. Acad-51 Dt. 5.7.2021, Acad-53 Dt. 22.7.2021 &
Circular no. Acad-07/2022 Dt. 14-01-22 for session 2021-2022
Author
l CBSE Sample Paper 2021-2022
HARPREET MALVAI
(Term– 2) M.Sc, MCA
l CBSE Marking Scheme
FOR CBSE
l Practice Paper(Solved) (1-3)
Mock Test (I & II)
XII
l
Term–2
Mock Test Based on
CBSE Sample Paper Term–2
issued by CBSE on Dt. 14.01.2022
PUBLISHED BY
Chandigarh–Bengaluru–Delhi–Guwahati–Hyderabad–Indore
Jammu–Jaipur–Kolkata–Lucknow–Mumbai–Patna–Ranchi
COMPLIMENTARY COPY
COMPUTER SCIENCE (083) CLASS-XII
PUBLISHED BY
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or
otherwise, without the prior permission of the Publisher.
E-mail : info@vishvasbook.com
In spite of our sincere efforts, there might have crept in some
deficiencies in the preparation of this book for which the Authors and
Publisher should not be held responsible. However, constructive © Copyright Reserved
suggestions for further improvement of this book will be highly
appreciated and looked forward in our subsequent editions. For latest Printed at :
update in syllabus and marking scheme visit : www.cbse.nic.in PRINTOMEX PRINTERS
MOHALI – 160062
Curriculum
Computer Science
CLASS-XII (083) 2021-22(Term-II)
1. Prerequisites
Computer Science- Class XI
2. Learning Outcomes
Student should be able to
a) apply the concept of function.
b) explain and use the concept of file handling.
c) use basic data structure: Stacks.
d) explain basics of computer networks.
e) use Database concepts, SQL along with connectivity between Python and SQL.
3. Distribution of Marks:
Total 70 80 40
Total 35 35
III
Unit II: Computer Networks
l Evolution of networking: introduction to computer networks, evolution of networking
(ARPANET, NSFNET, INTERNET)
l Data communication terminologies: concept of communication, components of data
communication (sender, receiver, message, communication media, protocols), measuring
capacity of communication media (bandwidth, data transfer rate), IP address, switching
techniques (Circuit switching, Packet switching)
l Transmission media: Wired communication media (Twisted pair cable, Co-axial cable, Fiber-
optic cable), Wireless media (Radio waves, Micro waves, Infrared waves.
l Network devices (Modem, Ethernet card, RJ45, Repeater, Hub, Switch, Router, Gateway,
WIFI card)
l Network topologies and Network types: types of networks (PAN, LAN, MAN, WAN),
networking topologies (Bus, Star, Tree)
l Network protocol: HTTP, FTP, PPP, SMTP, TCP/IP, POP3, HTTPS, TELNET, VoIP
l Introduction to web services: WWW, Hyper Text Markup Language (HTML), Extensible
Markup Language (XML), domain names, URL, website, web browser, web servers, web
hosting
IV
5. Practical
1 Lab Test: 8 6 2
1. Python program
2. 3 SQL Queries based on one/two table(s), 2 output 4 – 4
questions based on SQL queries
2 Report file: 7 4 3
Term – 1 : Minimum 15 Python programs based on
Term – 1 Syllabus
Term – 2 :
l Minimum 3 Python programs based on Term-2
Syllabus
l SQL Queries – Minimum 5 sets using one table /
two tables.
l Minimum 2 programs based on Python - SQL
connectivity.
Database Management
l Create a student table and insert data. Implement the following SQL commands on the
student table:
o ALTER table to add new attributes / modify data type / drop attribute
o UPDATE table to modify data
o ORDER By to display data in ascending / descending order
o DELETE to remove tuple(s)
V
o GROUP BY and find the min, max, sum, count and average
o Joining of two tables.
l Similar exercise may be framed for other cases.
l Integrate SQL with Python by importing suitable module.
PROJECT
The aim of the class project is to create something that is tangible and useful using Python file
handling/ Python-SQL connectivity. This should be done in groups of two to three students and
should be started by students at least 6 months before the submission deadline. The aim here is
to find a real world problem that is worthwhile to solve.
Students are encouraged to visit local businesses and ask them about the problems that they
are facing.
For example, if a business is finding it hard to create invoices for filing GST claims, then students
can do a project that takes the raw data (list of transactions), groups the transactions by
category, accounts for the GST tax rates, and creates invoices in the appropriate format.
Students can be extremely creative here. They can use a wide variety of Python libraries to
create user friendly applications such as games, software for their school, software for their
disabled fellow students, and mobile applications, of course to do some of these projects, some
additional learning is required; this should be encouraged. Students should know how to teach
themselves.
The students should be sensitised to avoid plagiarism and violations of copyright issues while
working on projects. Teachers should take necessary measures for this.
VI
ABOUT THE AUTHOR
Harpreet Malvai has been teaching Computer Science for more than
two decades in some of the top schools in India, including Maharani
Gayatri Devi School, Jaipur and Carmel Convent School, Chandigarh. She
is MSc, M.C.A and honours graduate from the Advanced Centre for
Mathema cs, Panjab University, Chandigarh. She has done
specializa on courses in 'Data Science in Python' and 'Applied Data
Visualiza on in Python' from University of Michigan (USA). She has also
done 'Python for Data Science, Ar ficial Intelligence and
Development' and 'What is Data Science?' from IBM. Along with these
technical courses she has successfully done a course in wri ng from
University of California, Berkeley (USA).
She is the director of a founda on for inclusivity in educa on and has been felicitated by the
CBSE for her contribu on to educa on through outreach programmes. In her teaching
career the endeavour has been to reach to all levels of learners at their level and her students
have performed well consistently. Some of her students have topped the CBSE board in her
subject, in fact one year, two toppers out of the five toppers of the board were her students.
VII
MOCK TEST-2022 COMPUTER SCIENCE 8
(SECTION A)
Each question carries 2 marks
M011 Harry Potter and the Chamber of Secrets English 4 Prime Video
Which field will be considered as the foreign key if the tables MOVIEDETAILS and SCHEDULE are
related in a database?
MOCK TEST-2022 COMPUTER SCIENCE 10
(SECTION B)
Each question carries 3 marks
Q8. 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: (3)
l Push the keys (name of the student) of the dictionary into a stack, where the corresponding
value (marks) is greater than 75.
l 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
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.
l Traverse the content of the list and push the even numbers into a stack.
l 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]
Table: CITY
(SECTION C)
Each question carries 4 marks
Q11. Write queries (a) to (d) based on the tables EMPLOYEE and DEPARTMENT given below: (4)
Table: EMPLOYEE
Table: DEPARTMENT
D001 Personal 4
D002 Admin 10
D003 Production 1
D004 Sales 3
MOCK TEST-2022 COMPUTER SCIENCE 12
MARKING SCHEME
COMPUTER SCIENCE (CODE-083)
CLASS XII TERM-II SESSION 2021-22
Time allowed: 2 hours Maximum Marks: 35
General instructions:
l The question paper is divided into 3 sections – A, B and C
Section -A
Each question carries 2 marks
Q. Part Question Marking Marks
No No. Instructions
(b) MOVIEID should be made the primary key as it uniquely ½ mark for correct (2)
identifies each record of the table. field and ½ mark
for justification
OR
SECTION – B
Each question carries 3 marks
(ii) DDL: DROP TABLE, ALTER TABLE ½ mark for each (2)
DML: INSERT INTO, UPDATE...SET correct command
identified
MOCK TEST-2022 COMPUTER SCIENCE 16
Disadvantages
l long cable length
l difficult to expand (2)
l central node dependency
OR
www: a set of protocols that allow you to access any document
on the internet through the naming systems based on URLs 1 mark for each
Web hosting: Web hosting is a service that allows correct definition
organizations and individuals to post a website or web page onto
the server, which can be viewed by everyone on the Internet.
17 MARKING SCHEME – XII
Circuit switching
l physical connection is established between sender and
receiver
l Each data unit knows the entire path from sender to receiver
l It does not follow store and forward concept
Block D (4)
Block C
PRACTICE PAPER–1(SOLVED)
COMPUTER SCIENCE (083)
Time allowed: 2 hours Maximum Marks: 35
General instructions:
l The question paper is divided into 3 sections – A, B and C
l Section A, consists of 7 questions (1-7). Each question carries 2 marks.
l Section B, consists of 3 questions (8-10). Each question carries 3 marks.
l Section C, consists of 3 questions (11-13). Each question carries 4 marks.
l Internal choices have been given for question numbers 7, 8 and 12.
(SECTION A)
Each question carries 2 marks
Table: Sportstars
Admn_No Name DOB Sport Medals Class
V1237 Vanshika 2005-02-19 Tennis 3 11
S1432 Ruhaani 2005-09-11 Football 5 12
SM1781 Aalam 2005-07-01 Cricket 4 11
V1935 Manan 2005-04-07 Football 6 11
S1276 Aarav 2005-10-06 Tennis 4 12
SM1872 Rehaan 2004-12-11 Football 3 12
Q6. (i) Which command deletes an entire table, a view of a table or other objects in the database? (1)
(ii)What are SQL Joins? (1)
Ans. (i) DROP TABLE tablename
(ii)The SQL Joins are used to combine records from two or more tables in a database. A JOIN is a
means for combining fields from two tables by using values common to each.
Q7. Consider the Table Customers given below: (2)
ID Name Age City Salary
1 Kashika 37 Jammu 80000.00
2 Anupriya 35 Shimla 75000.00
3 Vijayan 36 Hyderabad 65000.00
4 Krishnan 35 Chennai 55000.00
5 Harsh 37 Gandhinagar 85000.00
6 Raisa 32 Mumbai 45000.00
8 Clifford 36 Chennai 65000.00
9 Jaisha 36 Mumbai 85000.00
10 Aseem 37 Hyderabad 75000.00
11 Shona 35 Hyderabad 65000.00
12 Manan 38 Jammu 60000.00
(b) Which field should be made the primary key? Justify your answer.
Ans. (a) Degree: 5 Cardinality: 11
(b) The field ID should be made the primary key as it uniquely identifies each record of the table.
SECTION – B
Each question carries 3 marks
Q.8 Write a function in Python ENQ(Evenlist), where Evenlist is a list of numbers, from which we will
enqueue all the even numbers into a queue implemented by using a list. Display the queue if it has at
least one element, otherwise display appropriate error message. (3)
Ans. def ENQ(Evenlist):
qlist=[]
for element in Evenlist:
if element%2==0:
qlist.append(element)
if len(qlist)>0:
return qlist
else:
return "Underflow Error:Stack is Empty”
Q9. (i) A table, SPORTSTARS has been created in a database with the following fields: (3)
Admn_No, Name, DOB, Sport, Medals, Class
Give the SQL command to rename the field Class to Grade in this table.
(ii) Which of the following is a DDL command?
DELETE FROM, DROP TABLE, CREATE TABLE, INSERT INTO
Ans. (i) ALTER TABLE sportstars RENAME COLUMN Class TO Grade;
(ii) DDL: DROP TABLE, CREATE TABLE
Q10. Golden Tulips is using MySQL to create a database called STUDENTDETAILS with a table Student
which the following structure. Write the SQL commands for doing the same. (3)
Field Data Type Remarks NULL
StudentID char(10) Primary Key NO
NAME varchar(30) NO
DOB date NO
CITY varchar(30) YES
MARKS int YES
Email varchar(30) YES
Ans. The SQL commands are:
CREATE DATABASE STUDENTDETAILS;
CREATE TABLE Student(StudentID CHAR(10) PRIMARY KEY,NAME VARCHAR(30)
NOT NULL,DOB date NOT NULL, CITY VARCHAR(30),MARKS INTEGER);
21 SAMPLE QUESTION PAPER-1(SOLVED) – XII
(SECTION C)
Each question carries 4 marks
Q11. Write SQL commands for the queries (a)-(d) based on the two tables TAXITYPE and TRAVEL (4)
TABLE: TAXITYPE
T02 AC INNOVA 20
T03 AC ERTIGA 15
T04 AC HATCHBACK 10
T05 AC SEDAN 10
TABLE: TRAVEL
a) To display CNO, CNAME, TRAVELDATE from the table TRAVEL in descending order of CNO.
b) To display the CNAME of all customers from the table TRAVEL who are travelling by vehicle with
code T01 or T02
c) To display the CNO and CNAME of those customers from the table TRAVEL who travelled between
'2019-01-06' and '2019-05-01'.
d) To display all the details from table TRAVEL for the customers, who have travel distance more than
250 KM in ascending order of NOP (Number of Passengers)
Ans. a) SELECT CNO, CNAME, TRAVELDATE FROM TRAVEL ORDER BY CNO DESC;
b) SELECT CNAME FROM TRAVEL WHERE TAXI_CODE= 'T01' OR TAXI_CODE = 'T02';
OR
SELECT CNAME FROM TRAVEL TAXI_CODE IN ( 'T01', 'T02');
MOCK TEST-2022 COMPUTER SCIENCE 22
Advantages Disadvantages
1. Easy to install and is used for small 1. Fails if central line fails.
networks. 2. Single communication channel can slow
2. Media requirements low. down the access time.
3. One node failing does not affect the 3. High network traffic can slow down the
network functioning. speed.
OR
Bandwidth: The amount of data that can be transferred over a network in a specific amount of
time is termed as Bandwidth. It is expressed as a bitrate and measured in bits per second (bps),
Mbps and Gbps.
IP address (internet protocol address) is a standard numerical representation that uniquely
identifies a specific interface on the network. An IP address is, generally represented as 4 octets of
numbers from 0-255. The IP address has two parts- the network part and the host part. The first
part of the IP address represents the network and the rest will specify the host including the
individual device.
(ii) Radio Waves Microwaves
Frequency range of Radio Waves is 3 KHz and Frequency range of Microwaves is 1 GHz to
1 GHz 300 Ghz
Q13. Ishana Electronics Company headquaters has four blocks of buildings as shown: (4)
PRACTICE PAPER–2(SOLVED)
COMPUTER SCIENCE (083)
Time allowed: 2 hours Maximum Marks: 35
General instructions:
l The question paper is divided into 3 sections – A, B and C
l Section A, consists of 7 questions (1-7). Each question carries 2 marks.
l Section B, consists of 3 questions (8-10). Each question carries 3 marks.
l Section C, consists of 3 questions (11-13). Each question carries 4 marks.
l Internal choices have been given for question numbers 7, 8 and 12.
(SECTION A)
Each question carries 2 marks
Q5. Write the output of the queries (a) to (d) based on the table SMARTWATCH, given below: (2)
Table: SMARTWATCH
WATCHID NAME PRICE QTY_STORE
W1 Fitbit Versa 21000 100
W2 Apple Watch 55000 150
W3 Garmin Fenix 75000 50
W4 Fitbit Versa 21000 100
W5 Samsung Galaxy 27000 200
W6 Amazfit Watch 17000 100
W7 Fossil Hybrid 15000 50
c) 90000 d) 33000
Q6. (i) Which command is used to see the table structure (1)
(ii) What is a Cartesian join or product on two tables? (1)
Ans. (i) DESC tablename or DESCRIBE tablename
(ii) The Cartesian join is used to generate a paired combination of each row of the first table with each
row of the second table. This join type is also known as cross join. The resultant rows are a product
of the number of rows in each table.
Q7. In the table Loan below (2)
(a) Identify the candidate key(s) from the table Loan.
(b) Which field will be considered as the foreign key if the tables Customers and Loan are related in a
database?
Table Loan
LoanID LoanDate ID EMI Years
1101 2021-03-01 5 20000 4
1102 2021-02-06 3 10000 2
1103 2021-04-12 4 10000 3
1104 2021-05-15 5 5000 3
MOCK TEST-2022 COMPUTER SCIENCE 26
Table Customers:
(SECTION B)
Each question carries 3 marks
Q8. Coach Abhishek stores the races and participants in a dictionary. Write a program, with separate
user defined functions to perform the following operations: (3)
l Push the names of the participants of the dictionary onto a stack, where the distance is more
than 100.
l Pop and display the content of the stack. For example:
If the sample content of the dictionary is as follows:
Races ={100:'Varnika', 200 :'Jugal', 400:'Kushal', 800:'Minisha'}}
The output from the program should be:
Minisha Kushal Jugal
Ans. Races ={100:'Varnika',200:'Jugal', 400:'Kushal',800:'Minisha'}
def PUSH(Stk,N):
Stk.append(N)
def POP(Stk):
if Stk!=[]:
return Stk.pop()
else:
return None
stack1=[]
for i in Races:
if i>=200:
PUSH(stack1,Races[i])
27 SAMPLE QUESTION PAPER-2(SOLVED) – XII
while True:
if stack1!=[]:
print(POP(stack1),end=" ")
else:
break
Q9. (i) A table, Students has been created in a database with the following fields: (3)
StudentID, NAME, DOB, CITY, MARKS
Give the SQL command to change the datatype of CITY from Varchar(30) to Char(30).
(ii) Which of the following is a DML command?
SELECT…FROM, CREATE TABLE, INSERT, UPDATE
Ans. (i) ALTER TABLE Students MODIFY COLUMN CITY char(30);
(ii) DML: SELECT…FROM, INSERT INTO, UPDATE...SET
Q10. Maniklal Fabrics is creating a database called Stores with a table called City_Store. Write the SQL
commands for doing the same. (3)
Store_id INT Primary Key
Manager Varchar(20)
Address Varchar(30)
City Varchar(20)
City_Code Char(5)
Last_update Date
(SECTION C)
Each question carries 4 marks
Q11. A database called ecompany has two tables COMPANY and CUSTOMER with the following records.
Write SQL commands for the queries (a)-(d) based on the two tables COMPANY and CUSTOMER
(4)
COMPANY
PID NAME CITY PRODUCTNAME
COUSTMER
CUSTID NAME UNITPRICE QTY PID
101 REENA SONI 60,000 10 2102
102 MICHAEL PAUL 50,000 20 2106
103 MEETALI SINGH 70,000 15 2101
104 PARUL SOHAL 55,000 3 2103
105 RAJESH DESWAL 45,000 7 2104
a) Write an SQL statement to display the name of the companies in reverse alphabetical order.
b) To add one more column to the table customer called TOTAL_PRICE which can have up to two
decimal places.
c) Write an SQL statement to count the products city wise.
d) Write an SQL statement to display the customer name, product of the unit price and quantity,
product name where the name of the city is Mumbai.
Ans. a) SELECT NAME FROM COMPANY ORDER BY NAME DESC;
b) ALTER TABLE CUSTOMER ADD TOTAL_PRICE DECIMAL(10,2);
c) SELECT COUNT(*), CITY FROM COMPANY GROUP BY CITY;
d) SELECT CUSTOMER.NAME, UNITPRICE*QTY, PRODUCTNAME FROM COMPANY,
CUSTOMER WHERE COMPANY.PID=CUSTOMER.PID AND CITY= 'MUMBAI';
Q12. (i) Give two advantages and two disadvantages of ring topology. (4)
OR
Define the following terms:
Web Browser, Web server
(ii) Differentiate between wired and wireless Transmission Media.
Ans. (i) Ring Topology
Advantages Disadvantages
This arrangement prevents collisions. Needs more cable than bus.
29 SAMPLE QUESTION PAPER-2(SOLVED) – XII
Data packets travel at greater speeds. Any snag in the cable ring crashes the
network.
Any problems with device and cable can be The network activity is disturbed when adding
easily located. or removing a node.
OR
Web Browser: This is an application software used to view or browse web pages from a web server.
Have to type the exact URL to view the web page to request for a web page. This has no database.
Google Chrome, Safari, Mozilla Firefox, Microsoft Edge are some popular web browsers.
Web Server: This is a technologically advanced machine that stores all the files containing the web
pages which can be viewed by the web browser. Web Servers store, process and deliver web pages
to the users when they receive a request from a browser. The Web Server provides the storage
space for website files. Apache Server is the most popular server.
(ii) Wired Transmission Media: Wired transmission media are the cables that are used in networking.
Popular wired transmission media are twisted pair cable, co-axial cable and fiber optical cable.
Each of them has its own characteristics like transmission speed, effect of noise, physical
appearance, cost etc.
Wireless Transmission Media: Wireless transmission media are the ways of transmitting data
without using any cables. Nowadays wireless communication is becoming popular as it is not
bounded by physical geography. This transmission uses Microwave, Radio wave, Infrared or a
combination of these.
Q13. Jeevan CareGivers Company has set up its head office with 4 blocks of buildings named Block A, Block
B, Block C and Block D. (4)
The number of computers in each block are:
Block A-25 Block B-50
Block C-125 Block D-10
Shortest distances between various Blocks in meters:
Block A to Block B-60 m Block B to Block C-40 m
Block C to Block A-30 m Block D to Block C-50 m
(i) Suggest the most suitable place (i.e. block) to house the server of this company with a suitable
reason.
(ii) Suggest the type of network to connect all the blocks with suitable reason.
(iii) The company is planning to link all the blocks through a secure and high speed wired medium.
Suggest a way to connect all the blocks.
(iv) Suggest the most suitable wired medium for efficiently connecting each computer installed in
every block out of the following network cables:
• Coaxial Cable • Ethernet Cable • Single Pair Telephone Cable.
Ans. (i) Block C , It has maximum number of computer.
(ii) Since the distance between the blocks is less than 1 Km and LAN can be upto 10 Km
(iii) Star topology (iv) Ethernet Cable
MOCK TEST-2022 COMPUTER SCIENCE 30
PRACTICE PAPER–3(SOLVED)
COMPUTER SCIENCE (083)
Time allowed: 2 hours Maximum Marks: 35
General instructions:
l The question paper is divided into 3 sections – A, B and C
l Section A, consists of 7 questions (1-7). Each question carries 2 marks.
l Section B, consists of 3 questions (8-10). Each question carries 3 marks.
l Section C, consists of 3 questions (11-13). Each question carries 4 marks.
l Internal choices have been given for question numbers 7, 8 and 12.
(SECTION A)
Each question carries 2 marks
Table Store_Items:
Item_Id Item_Name Item_Brand CategoryID Price Unit
1010 Milk Verka Cat1 20 litre
1012 Curd Amul Cat1 50 kg
1003 Lassi Vita Cat1 30 litre
1024 Chaach Amul Cat1 20 litre
1006 Eggs None Cat2 48 dozen
1007 Gur None Cat3 40 kg
1008 Honey None Cat3 200 litre
(SECTION B)
Each question carries 3 marks
Q8. Create a function enqueue( ) to add multiples of 3 up to 30 to a queue. Then dequeue all the items
of this queue using dequeue( ), this function returns the deleted item each time or otherwise it
displays an appropriate error message. Display the numbers from the queue in a single line. (3)
Ans. #Adding elements to the queue
def enqueue(data):
queue.append(data)
#Removing elements from the queue
def dequeue():
if len(queue)>0:
return queue.pop(0)
return ("Queue Empty!")
# executable code
queue=[]
for x in range(3,30,3):
enqueue(x)
for i in range(len(queue)):
print(dequeue(),end=" ")
33 SAMPLE QUESTION PAPER-3(SOLVED) – XII
Q9. (i) Write the SQL statement to change the Price of Milk from 25 to 30 in the table STORE_ITEMS
given below. (3)
Item_Id Item_Name Item_Brand Item_Category Price Unit
1001 Milk Verka Cat1 25 litre
1002 Curd Amul Cat1 50 kg
1003 Lassi Vita Cat1 30 litre
1004 Chaach Amul Cat1 20 litre
(ii) Write the category DDL, DML or DCL for the following commands
GRANT, DROP TABLE, INSERT INTO, UPDATE…SET, REVOKE
Ans. (i) UPDATE STORE_ITEMS SET Price=25 WHERE Item_Id='1001';
(ii) DDL: DROP TABLE
DML: INSERT INTO, UPDATE. ..SET
DCL: GRANT, REVOKE
Q10. Ravish is a Database Admin who joins a Technology company DataSys. The company has a database
to which Ravish wants to add another table. What will be the SQL commands for creating the table
while checking whether the table COUNTRIES already exists. (3)
The following are the details of the table structure:
CITY_CODE CHAR(5)
CURRENCY DECIMAL(10,0)
(SECTION C)
Each question carries 4 marks
Q11. Write the SQL statement to display all the information asked in queries (a-d) based on the tables
below: (4)
SALESPERSON TABLE
salesperson_id name city incentive
1001 Nitin Jairam Delhi 0.12
1002 Gaurav Jha Kolkata 0.13
1007 Vinita S Hyderabad 0.11
1003 Jockim Lobo Bangalore 0.15
1005 Arun Mehta Bhopal 0.14
1006 Vinny Noom Mumbai 0.12
ORDER TABLE
a) Delete the record from order table where order number is 30009
b) Write an SQL statement to display customer_id and salesperson_id from order table where
purch_amount is between 1000 and 2500.
c) Write a query to display all the columns from salesperson sort the result in an ascending order by
the name and incentive.
35 SAMPLE QUESTION PAPER-3(SOLVED) – XII
d) Write an SQL statement to display salesperson_id and sum of purch_amount from order table
grouped by customer_id.
Ans. a) DELETE FROM order WHERE order_no=30009;
b) SELECT customer_id, salesperson_id FROM order WHERE purch_amount
BETWEEN 1000 AND 2500;
c) SELECT * FROM salesperson ORDER BY name, incentive;
d) SELECT salesperson_id, SUM(purch_amt) FROM order GROUP BY
customer_id;
Q12. What is network Topology, explain with examples of topologies. (4)
Ans. Network Topology is the geographical, physical or logical arrangement of computer networking
devices. Topology is the way in which the various nodes or computers of a network are linked together
or the actual layout of the computer network hardware.
Some Network Topologies are: Bus Topology, Ring Topology, Star Topology, Mesh Topology and Tree
Topology.
Q13. National Skill Training Academy has for wings A, B, C, D (4)
Distance between various wings are given below:
Wing A to Wing B-100m Wing A to Wing C-200m
Wing A to Wing D-400m Wing B to Wing C-300m
Wing B to Wing D-100m Wing C to Wing D-450m
Number of Computers installed at various wings are as follows:
Wing A-20 Wing B-150
Wing C-50 Wing D-25
(i) Suggest the best wired medium and the cable layout to efficiently connect various wings of
National Skill Training Academy.
(ii) Name the most suitable wing where the Server should be installed.Justify your answer.
(iii) Suggest a device/software and its placement that would provide data security for the Academy.
(iv) What will be needed to provide wireless Internet access to all smartphone/laptop users in the
Academy.
Ans. (i) Optic Fibre and Star Topology.
(ii) Wing B as it has the maximum number of computers
(iii) Firewall with the server in Wing B.
(iv) A High bandwidth Broadband Connection and Wi-Fi Router.
MOCK TEST-2022 COMPUTER SCIENCE 36
MOCK TEST–I
COMPUTER SCIENCE (083)
Time allowed: 2 hours Maximum Marks: 35
General instructions:
l The question paper is divided into 3 sections – A, B and C
l Section A, consists of 7 questions (1-7). Each question carries 2 marks.
l Section B, consists of 3 questions (8-10). Each question carries 3 marks.
l Section C, consists of 3 questions (11-13). Each question carries 4 marks.
l Internal choices have been given for question numbers 7, 8 and 12.
(SECTION A)
Each question carries 2 marks
Table Store_Items:
Q8. Competent Couriers take user input for the name, address and phone number of the receiver and
store these in a tuple which is then pushed to a stack called parcelstock. Write a program, with separate
user defined functions to perform the following operations: (3)
l Push the details(name, address, phone) into a stack using the function Push(parcelstock,details).
l Pop and display the content of the stack
Q9. (i) Write the SQL statement to add a field Country_Code(of type Integer) to the table Countries with
the following fields. Country_id, Country_name, Continent, Region_id
(ii) Which of the following is not a DML command?
DELETE FROM, DROP TABLE, CREATE TABLE, INSERT INTO
Q10. Sahil wants to create a database HARDWARE which has a table RENTAL. He wants to make sure that city
name is unique and no field is left empty in the table. Write the SQL commands for the fields given
below.
(SECTION C)
Each question carries 4 marks
Q11. The table FLIGHT_BAGGAGE shows data about the number of baggage , total weight in kg for baggage
and cost per extra kg for different classes. The PASSENGER table shows the passengers with extra
baggage weight. Using the information given below write the SQL query for a)-d) (4)
TABLE FLIGHT_BAGGAGE
TABLE PASSENGER
EKG- Extra KG
BA-Bags Allowed
CPEKG- Cost per extra KG
TKGA- Total Kilograms Allowed
NOB- Number of Bags
Main
Admin Building
Finance Academic
MOCK TEST–II
COMPUTER SCIENCE (083)
Time allowed: 2 hours Maximum Marks: 35
General instructions:
l The question paper is divided into 3 sections – A, B and C
l Section A, consists of 7 questions (1-7). Each question carries 2 marks.
l Section B, consists of 3 questions (8-10). Each question carries 3 marks.
l Section C, consists of 3 questions (11-13). Each question carries 4 marks.
l Internal choices have been given for question numbers 7, 8 and 12.
(SECTION A)
Each question carries 2 marks
Q1. Differentiate between underflow and overflow in queues and stacks (2)
Q2. (i) Expand the following: (1)
ARPANET, NSFNET
(ii) What will be units to measure the size of high quality digital photograph? (1)
Q3. Which SQL logical operator is used to compare a value to similar values using wildcard operators? (2)
Which SQL logical operator reverses the meaning of the logical operator with which it is used?
Q4. What is the datatype of the result set extracted from the database using the cursor object when we use
the following: (2)
a) fetchone( ) method b) fetchall( ) method
Q5. Write the output of the queries (a) to (d) based on the table country, given below: (2)
SECTION – B
Each question carries 3 marks
Q8. Jiya has a list containing 8 integers. You need to help her create a program with two user defined
functions to perform the following operations based on this list.
l Traverse the content of the list and push those numbers into a stack which are divisible by both 5
and 3.
l Pop and display the content of the stack.
For example the following list:
[5,15,21,30,45,50,60,75]
And should display:
75 60 45 30 15
43 MOCK TEST–II – XII
Q9. (i) Write a SQL statement to rename the table Student to Student_new(considering this table does not
already exist in the database)
(ii) Differentiate between DDL and DML Commands.
Q10. The database MavenAdmin already has a table DEPARTMENTS, write the SQL statements to add a table
named HR_jobs with the following structure.
Section C
Each question carries 4 marks
Q11. Golden Rainbow school has a Schooladmin Database with the following Tables. Using the information
given in the 2 tables write the SQL query for a)-d)
Table: Students
Table: records
a) Write an SQL statement to display the StudentID, Name and Email of the students from Chandigarh
who play TT.
b) Write an SQL statement to display the Name and marks of Unit1 and Unit2 for those students who
scored above 44 marks after adding Unit1 and Unit2.
c) Write an SQL statement to display the Name and the total marks for the students from Mohali.
d) Write an SQL statement to display the average of the total marks of the students.
Q12. (i) Define the following terms: (4)
Web Browser, Web server
(ii) How is a Gateway different from a Repeater?
Q13. HerbalCity Pharma is a pharmaceutical company that has set up a new unit in Himachal Pradesh. They
have the following blocks on the campus. (4)
Research
Accounts
Lab
Packaging
Store
Unit
45 MOCK TEST–II – XII
Number of Computers
Accounts 35
Research Lab 110
Store 25
Packaging Unit 70
As a network expert, provide the best possible solutions for the following:
i) Suggest a cable layout of connections between the blocks.
ii) Suggest the most suitable block to house the server of this organization.
iii) Suggest the placement of the following device with justification:
a) Repeater b) Hub/Switch
iv) Suggest a system (hardware/software) to prevent unauthorized access to or from the network.