CS Final
CS Final
CS Final
COMPUTER SCIENCE
Class - XII
Question Bank Term- II 2021-22
कें द्रीय विद्यालय सगं ठन क्षेत्रीय कायाालय रायपरु
Kendriya Vidyalaya Sangathan Regional Office Raipur
It gives me immense pleasure to bring out the study material for 2 nd Term in
different subject of Classes X and XII for Raipur Region. All of us know that in the
1st Term Examination questions were objective but in 2nd Term questions will be
subjective so once again to get our children acquainted and familiarized with the new
scheme of examination and types of questions, it is of utmost significance that an
extensive study material should be provided to our children. This question bank is
in complete consonance with CBSE Circular Number 51 and 53 issued in the month
of July 2021. It will help students to prepare themselves better for the examination.
Sound and deeper knowledge of the Units and Chapters is must for grasping the
concepts, understanding the questions. Study materials help in making suitable and
effective notes for quick revision just before the examination.
I would like to extend my sincere gratitude to all the principals and the teachers
who have relentlessly striven for completion of the project of preparing study
materials for all the subjects. Their enormous contribution in making this project
successful is praiseworthy.
Happy learning and best of luck!
Vinod Kumar
(Deputy Commissioner)
कें द्रीय विद्यालय सगं ठन क्षेत्रीय कायाालय रायपरु
Kendriya Vidyalaya Sangathan Regional Office Raipur
Our Patorn
Vinod Kumar
Deputy Commissioner
KVS RO Raipur
CONTENT TEAM
Mrs. Tara Yadav, PGT CS, K V Bilaspur
• Data Structure: Stack, operations on stack (push & pop), implementation of stack using
list.
● Network devices (Modem, Ethernet card, RJ45, Repeater, Hub, Switch, Router, Gateway,
WIFI card)
● Network topologies and Network types: types of networks (PAN, LAN, MAN, WAN),
networking topologies (Bus, Star, Tree)
● Network protocol: HTTP, FTP, PPP, SMTP, TCP/IP, POP3, HTTPS, TELNET, VoIP
● Introduction to web services: WWW, Hyper Text Markup Language (HTML),
Extensible Markup Language (XML), domain names, URL, website, web browser, web
servers, web hosting
Unit III: Database Management
• Database concepts: introduction to database concepts and its need
• Relational data model: relation, attribute, tuple, domain, degree, cardinality, keys
(candidate key, primary key, alternate key, foreign key)
• Structured Query Language: introduction, Data Definition Language and Data
Manipulation Language, data type (char(n), varchar(n), int, float, date), constraints
(not null, unique, primary key), create database, use database, show databases, drop
database, show tables, create table, describe table, alter table (add and remove an
attribute, add and remove primary key), drop table, insert, delete, select, operators
(mathematical, relational and logical), aliasing, distinct clause, where clause, in,
between, order by, meaning of null, is null, is not null, like, update command, delete
command
• Aggregate functions (max, min, avg, sum, count), group by, having clause, joins
:Cartesian product on two tables, equi-join and natural join
• Interface of python with an SQL database: connecting SQL with Python, performing
insert, update, delete queries using cursor, display data by using fetchone(), fetchall(),
rowcount, creating database connectivity applications
1. Practical
S.No Marks Term- Term-
(Total 1 2
30) (15 (15
Marks) Marks)
1 Lab Test:
1. Python program 8 6 2
4. 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.
1. A Computer Network:
A. Is a collection of hardware components and computers?
B. Is interconnected by communication channels
C. Allows sharing of resources and information
D. All of the above
2. What is a Firewall in computer network?
A. The physical boundary of network
B. An operating system of computer network
C. A system designed to prevent unauthorized access
D. A web browsing software
3. What is the use of Bridge in the Network?
A. To connect LANs
B. To separate LANs
C. To control network speed
D. All of the above
4. Each IP packet must contain:
A. Only Source address
B. Only Destination address
C. Source and Destination address
D. Source or Destination address
13. Hub is a
A. Broadcast device
B. Unicast device
C. Multicast device
D. None of the above
14. Switch is a
A. Broadcast device
B. Unicast device
C. Multicast device
D. None of the above
24. Which one of the following is the most common internet protocol?
A.HTML
B.NetBEUI
C.TCP/IP
D.IPX/SPX
27. Which of the following is not an unit for data transfer rate?
A.MBPS
B.KBPS
C.SBPS
D.GBPS
34. A device which can be connected to a network without using cable is called
A. Distributed device
B. Centralized device
C. Open-source device
D. Wireless device
35. The vast network of computers that connects millions of people all over the world
is called
A. Internet
B. Hypertext
C. LAN
D. Web
37. Which of the following appears harmless but actually performs malicious functions
such as deleting or damaging files.
A.WORM
B.Virus
C.Trojan Horse
D. Malware
40. Rajesh has purchased a new Smart TV and wants to cast a video from his mobile
to his new Smart TV. Identify the type of network he is using:
A.LAN
B.MAN
C.WAN
D.PAN
41. The topology in which all nodes are individually connected to a central
connection point:
A.Ring
B.Bus
C.Star
D.Tree
4. In specific, if the systems use separate protocols, which one of the following
devices is used to link two systems?
A.Repeater
B.Gateway
C.Bridge
D.Hub
49. The loss in signal power as light travels down the fiber is called.............
A. Attenuation
B.Propagation
C. Scattering
D.Interruption
50. Which of the following TCP/IP protocols is used for transferring files form one
machine to another.
A. FTP
B. SNMP
C. SMTP
D. RPC
51. Which of the following protocol is used for remote terminal connection service?
A. RARP
B. UDP
C. FTP
D. TELNET
53. It can be a software program or a hardware device that filters all data packets
coming through the internet, a network, etc. it is known as the_______:
A.Antivirus
B.Firewall
C.Cookies
D.Malware
55. Which of the following is a type of independent malicious program that never
required any host program?
A. Trojan Horse
B. Worm
C.Trap Door
D.Virus
56. In order to ensure the security of the data/ information, we need to ____________
the data:
A.Encrypt
B.Decrypt
C.Delete
D.None of the above
58. It allow a visited website to store its own information about a user on the user’s
computer:
A.Spam
B.cookies
C.Malware
D.Adware
59. In which of the following switching methods, the message is divided into small
packets?
A. Message switching
B. Packet switching
C. Circuit switching
D. None of these
66. Which of the following is not a type of guided or wired communication channel?
A.Twisted Pair
B.Coaxial
C.Fibre Optic
D.WiMax
68. Which of the following wireless medium consists of a parabolic antena mounted
on towers?
A.Sattelite
B.Radiowave
C.Microwave
D.Infrared
69. Which of the following cable consist of a solid wire core surrounded by one or
more foil or wire shields?
A.Ethernet Cables
B.Coaxial Cables
C.Fibre Optic Cables
D.Power Cable
73. Which protocol is commonly used to retrieve email from a mail server?
A. FTP
B. IMAP
C. HTML
D. TELNET
76. A network point that provides entrance into another network is called as ___________
A. Node
B. Gateway
C. Switch
D. Router
79. Name the transmission media best suitable for connecting to hilly areas.
A.Co-axial Cable
B.Twisted pair
C. Microwave
D.Optical fiber.
80. Rahul wants to establish computer network in his cyber café, which of the following
device will be suggested by you to connect each computer in the cafe?
A.Switch
B.Modem
C.Gateway
D.Repeater
Q1. Give one example of each – Guided media and unguided media.
Ans: Guided – Twisted pair, Coaxial Cable, Optical Fiber (any one) Unguided –
Radio waves, Satellite, Micro Waves (any one)
Q2. Name the protocol that is used to transfer file from one computer to another.
Ans:FTP
Q3. Name the transmission media best suitable for connecting to desert areas.
Ans: Microwave
Q4. Rearrange the following terms in increasing order of speedy medium of data
transfer: Telephone line, Fiber Optics, Coaxial Cable, Twisted Paired Cable.
Ans: Telephone line, Twisted Pair Cable, Coaxial Cable, Fiber Optics.
Q5.Which of the following appears harmless but actually performs malicious
functions such as deleting or damaging files.
(a) WORM (b)Virus (c) Trojan Horse
(d)Malware
Ans: (c) Trojan Horse
Q6. Name the transmission media suitable to establish PAN.
Ans: Bluetooth, infra-red
Q7. Name the protocol that is used to upload and download files on internet.
Ans: FTP or HTTP
Q8.Name the protocol that is used to send emails.
Ans:-SMTP
Q9. Name the protocol that is used to receive emails.
Ans:-POP
Q10. Name the transmission media best suitable for connecting to hilly areas.
Ans: Microwave / Radio wave.
Q11. Name the fastest available transmission media.
Ans: OFC (Optical Fiber Cable)
Q12. Sunil has purchased a new Smart TV and wants to cast a video from his mobile to his
new Smart TV. Identify the type of network he is using and explain it.
Ans: Sunil is using PAN-Personal Area Network. It is a private network which is setup by
an individual to transfer data among his personal devices of home.
Q2. What is difference between star topology and bus topology of network?
Аnswer:
In star topology, nodes are connected to server individually whereas in bus topology
all nodes are connected to server along a single length of cable.
Q3.Write two advantages of using an optical fibre cable over an ethernet cable to connect
two service stations, which are 190 m away from each other.
Аnswer:
Low power Because signals in optical fibres degrade less, lower power transmitters can be
used.
Higher datarate Due to higher bandwidth, data rate of optical fibre is more than the data
rate of ethernet cable (upto 1 Gbps).
Q5. Which type of network (out of LAN, PAN and MAN) is formed, when you connect
two mobiles using bluetooth to transfer a picture file?
Аnswer:
When two mobiles are connected using bluetooth to transfer a picture file, a PAN(Personal
Area Network) is created.
Answer:
Firewall is a feature used for Network Security. In a Network there is always danger
of information leaking out or leaking in. Firewall is a feature which forces all
information entering or leaving the network to pass through a check to make sure
that there is no unauthorized usage of the network.
Answer:
URL stands for Uniform Resource Locator. Each page that is created for Web
browsing is assigned a URL that effectively serves as the page’s worldwide name or
address. URL’s have three parts: the protocol, the DNS name of the machine on
which the page is located and a local name uniquely indicating the specific
page(generally the filename).
Q1.PVS Computers decided to open a new office at Ernakulum, the office consist
of Five Buildings and each contains number of computers. The details are shown
below.
Building-2
Building-1
Building-3
Building-5
Building-4
Building 20
1 and 2 Meters
Building 50
2 and 3 Meters
Building 120
3 and 4 Meters
Building 70
3 and 5 Meters
Building 65
1 and 5 Meters
Building 50
2 and 5 Meters
Computers in each building are networked but buildings are not networked so far.
The Company has now decided to connect building also.
Q2. Riana Medicos Centre has set up its new centre in Dubai. It has four buildings as
shown in the diagram given below:
(4)
Research lab
Accounts
Packaging Store
unit
Accounts to Research
Lab 55 m
Accounts to Store 150 m
Store to Packaging Unit 160 m
Packaging Unit to
Research Lab 60 m
Accounts to Packaging
Unit 125 m
Store to Research Lab 180 m
Number of computers:
Accounts 25
Research Lab 100
Store 15
Packaging Unit 60
As a network expert, provide the best possible answer to the following queries:
(i) Suggest the type of network established between the buildings.
(ii) Suggest the most suitable place (i.e., building) to house the server of this organization.
(iii) Suggest the placement of the following devices with justification: Repeater, Switch
(iv) Suggest a system (hardware/software) to prevent unauthorized access to or from the
network.
(iii) (a) Repeater: It should be placed between Accounts and Packaging Unit, Accounts to
Research Lab, Store to Research Lab and Accounts to Packaging Unit.
(b) Switch should be placed in each of the buildings for better traffic management.
(iv) Firewall.
Q3. “Bhartiya Connectivity Association” is planning to spread their offices in four major
cities in India to provide regional IT infrastructure support in the field of Education &
Culture. The company has planned to setup their head office in New Delhi in three locations
and have named their New Delhi offices as “Front Office”, “Back Office” and “Work
Office”. The company has three more regional offices as “South Office”, “East Office” and
“West Office” located in other three major cities of India. A rough layout of the same is as
follows:
Approximate distance between these offices as per network survey team is as follows:
In continuation of the above, the company experts have planned to install the following
number of computers in each of their offices:
Back Office 100
Front Office 20
Work Office 50
East Office 50
West Office 50
South Office 50
(i) Suggest network type (out of LAN, MAN, WAN) for connecting each of the
following set of their offices:
• Back Office and Work Office
• Back Office and South Office
(ii) Which device you will suggest to be procured by the company for connecting all the
computers with in each of their offices out of the following devices?
• Switch/Hub
• Modem
• Telephone
(iii) Which of the following communication medium, you will suggest to be procured
by the company for connecting their local offices in New Delhi for very effective and
fast communication?
• Telephone Cable
• Optical Fiber
• Ethernet Cable
(iv) Suggest a cable/wiring layout for connecting the company’s local offices located in
New Delhi. Also, suggest an effective method/technology for connecting the
company’s regional offices-”East Office”, “West Office” and “South Office” with
offices located in New Delhi.
Answer:
(i) Network type: Head Office and Tech: LAN
Head Office and Coimbatore Office: WAN
(ii) Switch/Hub
(iii) Optical fiber
(iv) (a) Optical Fiber/Star Topology
(b) Wireless
Q4. Knowledge Supplement Organization has set up its new center at Mangalore for its
office and web based activities. It has 4 blocks of buildings as shown in the diagram below:
Block A
Block C
Block B Block D
Black A to Block B 50 m
Block B to Block C 150 m
Block C to Block D 25 m
Block A to Block D 170 m
Block B to Block D 125 m
Block A to Block C 90 m
Number of Computers
Black A 25
Block B 50
Block C 125
Block D 10
Block A Block C
Block B Block D
Layout Option 2: Since the distance between Block A and Block B is quite short
Block A Block C
(b)
Block B Block D
(c)
(b) The most suitable place / block to house the server of this organization would be Block C, as
this block contains the maximum number of computers, thus decreasing the cabling cost for
most of the computers as well as increasing the efficiency of the maximum computers in the
network.
(c) For Layout 1, since the cabling distance between Blocks A and C, and that between B and C
are quite large, so a repeater each, would ideally be needed along their path to avoid loss of
signals during the course of data flow in these routes
For layout 2, since the distance between Blocks A and C is large so a repeater would ideally
be placed in between this path
(d) The most economical way to connect it with a reasonable high speed would be to use radio
wave transmission, as they are easy to install, can travel long distances, and penetrate
buildings easily, so they are widely used for communication, both indoors and outdoors.
Q5. Ravya Industries has set up its new center at Kaka Nagar for its office and web based
activities. The company compound has 4 buildings as shown in the diagram below:
Fazz
Raj
Building
Building
Jazz
Building
Harsh
Building
b) Suggest the most suitable place (i.e. building) to house the server of this organization
with a suitable reason.
d) The organization is planning to link its sale counter situated in various parts of the same
city, which type of network out of LAN, MAN or WAN will be formed? Justify your
answer.
Answer:
a)
Layout 1:
Fazz
Raj
Building
Building
Jazz
Harsh Building
Building
Layout 2: Since the distance between Fazz Building and Jazz Building is quite short
Fazz
Raj
Building
Building
Jazz
Harsh Building
Building
b) the most suitable place (i.e. building) to house the server is Raj Building, as this block
contains the maximum number of computers, thus decreasing the cabling cost for most of the
computers as well as increasing the efficiency of the maximum computers in the network.
c) (i) Raj Building
(ii)In both the layouts, a hub/switch each would be needed in all the buildings, to interconnect
the group of cables from the different computers in each block
d) The type of network that shall be formed to link the sale counters situated in various parts
of the same city would be a MAN, because MAN (Metropolitan Area Networks) are the
networks that link computer facilities within a city.
3. The __________clause of SELECT query allows us to select only those rows in the results that
satisfy a specified condition.
(a) Where (b) from (c) having (d) like
4. Which of the following function is used to FIND the largest value from the given data in
MYSQL?
(a) MAX () (b) MAXIMUM () (c) LARGEST () (c) BIG ()
5. The data types CHAR (n) and VARCHAR (n) are used to create _______ and _______ types of
string/text fields in a database.
(a) Fixed, equal (b) Equal, variable (c) Fixed, variable (d) Variable, equal
7. Which command is used for cleaning up the environment (sql with Python)?
(a) my.close (b) is.close (c) con.close (d) mycon.close
12. Name the host name used for signing in the database.
(a) localhost (b) localpost (c) localcost (d) none of the above
14. Which is the subset of SQL commands used to manipulate database structure including tables?
(a) Data Definition Language (DDL) (b) Data Manipulation Language (DML)
(c) Both (a) and (b) (d) None
Which of the names will not be displayed by the below given query?
SELECT name FROM employee WHERE employee_id>5009;
(a) Amit, Sumit (b) Sumit, Arpit (c) Arpit (d) Amit, Arpit
20. Pick the correct username used for logging in database (sql with Python).
(a) root (b) local (c) directory (d) host
21. Aggregate functions can be used in the select list or the _____ clause of a select statement.
They cannot be used in a ______ clause.
(a) Where, having (b) Having, where (c) Group by, having (d) Group by, where
22. Select correct SQL query from below to find the temperature in increasing order of all cites.
(a) SELECT city FROM weather ORDER BY temperature;
(b) SELECT city, temperature FROM weather;
(c) SELECT city, temperature FROM weather ORDER BY temperature;
(d) SELECT city, temperature FROM weather ORDER BY city;
23. In SQL, which command is used to SELECT only one copy of each set of duplicable rows
(a) SELECT DISTINCT (b) SELECT UNIQUE
(c) SELECT DIFFERENT (d) All of the above
24. Which of the following is a SQL aggregate function?
(a) LEFT (b) AVG (c) JOIN (d) LEN
26. An attribute in a relation is foreign key if it is the _________key in any other relation.
(a) Candidate (b) Primary (c) Super (d) Sub
27. Which of the following sublanguages of SQL is used to query information from the data base
and to insert tuples into, delete tuples from, and modify tuples in the database?
(a) DML (Data Manipulation Language)
(b) DDL (Data Definition Language)
(c) Query
(d) Relational Schema
29. Which of the following is not a legal method for fetching records from database from within
Python?
(a) fetchone() (b) fetchtwo() (c) fetchall() (d) fetchmany()
31. Which of the following attributes can be considered as a choice for primary key?
(a)Name (b)Street (c) Roll No (d) Subject
33. What SQL statement do we use to display the record of all students whose last name contains 5
letters ending with “A”?
(a) SELECT * FROM STUDENTS WHERE LNAME LIKE ‘_ _ _ _A’;
(b) SELECT * FROM STUDENTS WHERE LNAME LIKE ‘ _ _ _ _ _’;
(c) SELECT * FROM STUDENTS WHERE LNAME LIKE ‘ ????A’;
(d) SELECT * FROM STUDENTS WHERE LNAME LIKE ‘*A’;
40. To open a connector to Mysql database, which statement is used to connect with mysql?
(a) Connector (b) Connect (c) password (d) username
41. If column “Marks” contains the data set {25, 35, 25, 35, 38}, what will be the output after the
execution of the given query?
SELECT MARKS (DISTINCT) FROM STUDENTS;
(a) 25. 35. 25. 35. 38 (b) 25, 25, 35, 35 (c) 25, 35, 38 (d) 25, 25, 35, 35
42. Which connector is used for linking the database with Python code?
(a) MySQL-connector (b) YesSQL: connector
(c) PostSQL: connector (d) None of the above
43. If column “Salary” contains the data set {1000, 15000, 25000, 10000, 15000}, what will be the
output after the execution of the given query?
SELECT SUM(DISTINCT SALARY) FROM EMPLOYEE;
(a)75000 (b) 25000 (c) 10000 (d) 50000
44. SQL applies conditions on the groups through _____ clause after groups have been formed,
(a) Group by (b) With (c) Where (d) Having
45. To execute all the rows from the result set, which method is used?
(a) fetchall (b) fetchone (c) fetchmany (d) none of the above
46. What is the meaning of “HAVING” clause is SELECT query?
(a) To filter out the summary groups (b) To filter out the column groups
(c) To filter out the row and column values (d) None of the mentioned
48. Which operator tests column for the absence of data (i.e., NULL value) ?
(a) EXISTS operator (b) NOT operator
(c) IS operator (d) None of these
50. Which SQL function is used to count the number of rows in a SQL query?
(a) COUNT () (b) NUMBER () (c) SUM () (d) COUNT (*)
51. With SQL, how can you return the number of not null record in the Project field of “Students”
table?
(a) SELECT COUNT (Project) FROM Students
(b) SELECT COLUMNS (Project) FROM Students
(c) SELECT COLUMNS (*) FROM Students
(d) SELECT COUNT (*) FROM Students
53. All aggregate functions except _______ ignore null values in their input collection.
(a) Count (attribute) (b) Count (*) (c) Avg (d) Sum
55. What will be the order of the data being sorted after the execution of given query
SELECT * FROM STUDENT ORDER BY ROLL_NO;
(a)Custom Sort (b) Descending (c) Ascending (d) None of the above
56. Where and Having clauses can be used interchangeably in SELECT queries?
(a) True (b) False (c) Only in views (d) With order by
57. A______ is property of the entire relation, which ensures through its value that each tuple is
unique in a relation.
(a) Rows (b) Key (c) Attribute (d) fields
58. The operation whose result contains all pairs of tuples from the two relations, regardless of
whether their attribute values match.
(a) Join (b) Cartesian product (c) Intersection (d) Set difference
60. The pattern ‘- - - ’ matches any string of ________ three character. ‘- - - %’ matches any string
of ____ three characters.
(a) Atleast, Exactly (b) Exactly, Atleast (c) Atleast, All (d) All, Exactly
Q1. Name the command/clause which is used to display the records in ascending or descending
order.
Q2. Give example of any two DML commands.
Q3. What is the purpose of SQL?
Q4. What is primary key?
Q5. Which command is used to display a list of already existing tables?
Q6. Which command is used to change the structure of table?
Q7. Which command is used to change the data of the table?
Q8. Which command is used to delete data of the table?
Q9. Which command delete the structure of table?
Q10. Identify the DDL and DML commands from the following:
Create, Delete
Q11. Which clause is used with aggregate functions? (Group by/ Where)
Q12. What do you mean by candidate key?
Q13. Correct the error in the following query.
Select * from RECORD where Rname = %math%;
Q14. What is max () function in SQL?
Q15. What do you mean by degree and cardinality of table?
Q16. Expand DDL and DML
Q17. Which command is used to increase the salary of workers in table salary? (Update / Alter)
Q18. Name the command used to see the structure of table.
Q19. Which aggregate function is used to find sum of column in a table?
Q20. What is the difference between having and where clause?
Q21. Name an aggregate function in SQL which return the average of numeric values.
Q22. What is the use of “like” in SQL?
Q23. Correct the following statement:
Delete table data;
Q24. What do you mean by aggregate function?
Q25. Write two wild card characters which are used with like operator?
Q26. Duplication of record is called ____________
Q27. What is the difference between char and varchar?
=====================*====================*========================
True/False Questions
1. The condition in a WHERE clause in a SELECT query can refer to only one value
2. SQL provides the AS keyword, which can be used to assign meaningful column names to
the results of queries using the SQL built-in functions.
3. The rows of the result relation produced by a SELECT statement can be sorted but only by
one column.
4. SQL is a programming language.
5. SELECT DISTINCT is used if a user wishes to see duplicate columns in a query.
6. The HAVING clause acts like a WHERE clause, but it identifies groups that meet a
criterion, rather than rows.
7. The qualifier DISTINCT must be used in an SQL statement when we want to Eliminate
duplicate rows.
8. DISTINCT and its counterpart, ALL, can be used more than once in a SELECT statement.
9. DISTINCT and its counterpart, ALL, can be used together on single field in a SELECT
statement.
10. SUM, AVG, MIN and MAX can only be used with numeric columns.
11. The SQL statement: SELECT salary + Comm AS Total FROM Emp; adds two fields salary
and comm from each row together and lists the results in a column named Total.
-------ANSWER -------
OBJECTIVE TYPE QUESTIONS /MULTIPLE CHOICE QUESTIONS
1 (a)Structure Query Language 21 (b)Having, where 41 (c)25,35,38
-------ANSWER -------
VERY SHORT ANSWER QUESTIONS (1 MARKS EACH)
ANS Q.N. ANS Q.N. ANS
Q.N.
1 order by clause 2 Insert , Delete 3 SQL is structured query
language. It is a standard
language of all the
RDBMS
4 A field which is 5 show tables; 6 Alter
unique for each and
every record in table is
called primary key.
7 Update 8 Delete 9 Drop
-------ANSWER -------
Fill in the blanks
1 Structured 11 NOT IN 21 Group/row/ aggregation
function
6 WHERE 16 COUNT
7 ORDER BY 17 GROUP BY
8 DESC 18 Fetchall()
9 AND 19 Connection
10 IN 20 Select
-------ANSWER -------
True and False
1 F 11 T 21 F
2 T 12 T 22 F
3 F 13 F 23 F
4 F 14 F 24 T
5 F 15 T 25 F
6 T 16 T 26 T
7 T 17 T 27 T
8 F 18 F 28 F
9 F 19 T 29 F
10 T 20 F 30 F
It returns one result per row It returns one result for multiple rows.
FACULTY
F_ID Fname Lname Hire_date Salary
102 Amit Mishra 12-10-1998 12000
103 Nitin Vyas 24-12-1994 8000
104 Rakshit Soni 18-5-2001 14000
105 Rashmi Malhotra 11-9-2004 11000
106 Sulekha Srivastava 5-6-2006 10000
COURSES
C_ID F_ID Cname Fees
C21 102 Grid Computing 40000
C22 106 System Design 16000
C23 104 Computer Security 8000
C24 106 Human Biology 15000
C25 102 Computer Network 20000
C26 105 Visual Basic 6000
i) Select COUNT(DISTINCT F_ID) from COURSES;
ii) Select MIN(Salary) from FACULTY,COURSES where COURSES.F_ID =
FACULTY.F_ID;
iii) Select avg(Salary) from FACULTY where Fname like ‘R%’
Q.2Write output for (i) & (iii) basedon a table COMPANY and CUSTOMER.
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
CUSTOMER
CUSTID NAME PRICE QTY CID
Q.3 Write output for (i) to (iii) based on the tables ‘Watches’ and ‘Sale’ given below.
Table: Watches
Watchid Watch_Name Price Type Qty_Store
W001 HighTime 10000 Unisex 100
W002 LifeTime 15000 Ladies 150
W003 Wave 20000 Gents 200
W004 HighFashion 7000 Unisex 250
W005 GoldenTime 25000 Gents 100
Table: Sale
Watchid Qty_Sold Quarter
W001 10 1
W003 5 1
W002 20 2
W003 10 2
W001 15 3
W002 20 3
W005 10 3
W003 15 4
i. select quarter, sum(qty_sold) from sale group by quarter;
ii. select watch_name,price,type from watches w, sale s wherew.watchid!=s.watchid;
iii. select watch_name, qty_store, sum(qty_sold), qty_store-sum(qty_sold) “Stock” from
watches
w, sale s where w.watchid=s.watchid group by s.watchid;
Q.4 Write the output for SQL queries (i) to (iii), which are based on the table:
Employees
Employees
Empid Firstname Lastname Designation City Salary
010 Ravi Kumar Manager GZB 75000
105 Harry Waltor Manager GZB 65000
152 Sam Tones Director Paris 80000
215 Sarah Ackerman Manager Upton 75000
244 Manila Sengupta Clerk New Delhi 50000
300 Robert Samuel Clerk Washington 45000
335 Ritu Tondon Clerk GZB 40000
400 Rachel Lee Salesman New York 32000
441 Peter Thompson Salesman Paris 28000
(i) Select Designation , count(*) from Employees Group by Designation Having
count(*)>=3;
(ii) Select Max (salary), Min(Salary) from Employees Where City in (‘GZB’,
‘Paris’);
(iii) Select Firstname, Lastname from Employees where Firstname like ‘R%’;
Q.5 Write output for queries (i) to (iii), which are based on the table:
Books.
Book_id Book_name Author_name Publisher Price Qty
C0001 Fast Cook Lata Kapoor EPB 355 5
F0001 The Tears William hopkin NIL 650 20
T0001 My First Py Brain& Brooke EPB 350 10
T0002 Brain works A.W. Rossaine TDH 450 15
F0002 Thunderbolts Anna Roberts NIL 750 5
i. Select Count(Publisher) from Books;
ii. Select Max(Price) from books where qty >=15;
iii. Select count(distinct publishers) from books where Price>=400;
ANSWERS
ANS .1 (i) 4 (ii) 6000 (iii) 12500
Ans.2
(i) Count(*) CITY
3 DELHI
2 MUMBAI
1 MADRAS
(ii) MIN (PRICE) -50000
MAX (PRICE) -7000
(iii) AVG (QTY)
11
Ans.3
(i) Quarter sum(qty_sold)
1 15
2 30
3 45
4 15
(ii) watch_name price type
HighFashion 7000 Unisex
(iii)
watch_name qty_store qty_sold Stock
HighTime 100 25 75
LifeTime 150 40 110
Wave 200 30 170
GoldenTime 100 10 90
Ans4.
(i) Manager 3
Clerk 3
(ii) 80000 28000
(iii) Ravi Kumar
Robert Samuel
Ritu Tondon
Rachel Lee
Ans .5
(i) 3 (ii)650 (iii)TDH
Table: GRADUATE
S.N NAME STIPEN SUBJECT AVERAG DI
O. D E V
1 KARAN 400 PHYSICS 68 1
2 DIVAKAR 450 COMPUTER SC 68 1
3 DIVYA 300 CHEMISTRY 62 2
4 ARUN 350 PHYSICS 63 1
5 SABINA 500 MATHEMATICS 70 1
6 JOHN 400 CHEMISTRY 55 2
7 ROBERT 250 PHYSICS 64 1
8 RUBINA 450 MATHEMATICS 68 1
9 VIKAS 500 COMPUTER SC 62 1
10. MOHAN 300 MATHEMATICS 57 2
(a) List the names of those students who have obtained DIV 1 sorted by NAME.
(b) Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend
received in a year assuming that the STIPEND is paid every month.
(c) To count the number of students who are either PHYSICS or COMPUTER SC
graduates.
(d) To insert a new row in the GRADUATE table:
11, “KAJOL”, 300, “COMPUTER SC”, 75, 1
(e) Display Name of the students whose average is more than 65.
Q.2 Write SQL commands for (a) to (e) on the basis of table CLUB.
Table: CLUB
COAC COAC AGE SPORTS DATEOFAP PAY SE
H ID H P X
NAME
1. KUKREJA 35 KARATE 27/03/1997 1000 M
2. RAVINA 34 KARATE 20/01/1998 1200 F
3. KARAN 34 SQUASH 19/02/1998 2000 M
4. TARUN 33 BASKETBALL 01/01/1998 1500 M
5. ZUBIN 36 SWIMMING 12/01/1998 750 M
6. KETAKI 36 SWIMMING 24/02/1998 800 F
7. ANKITA 39 SQUASH 20/02/1998 2200 F
8. ZAREEN 37 KARATE 20/02/1998 1100 F
9. KUSH 41 SWIMMING 13/01/1998 900 M
10. SHAILYA 37 BASKETBALL 19/02/1998 1700 M
(a) To show all information about the swimming coaches in the club.
(b) To list names of all coaches with their date of appointment (DATOFAPP) in
descending order.
(c) To display a report, showing coachname, pay, age and bonus (15% of pay) for all
the coaches.
(d) To insert in a new row in the CLUB table with the following data:
11, “PRAKASH”, 37, “SQUASH”, {25/02/98}, 2500, “M”
(e ) Display Coachname ,Sports,Pay from the table .
3. Write SQL command for (a) to (e ) on the basis of tables INTERIORS and
NEWONES.
Table: INTERIORS
NO ITEMNAME TYPE DATEOFSTOCK PRICE DISCOUNT
1 Red rose Double bed 23/02/02 32000 15
2 Soft touch Baby cot 20/01/02 9000 10
3 Jerry’s home Baby cot 19/02/02 8500 10
4 Rough wood Office Table 01/01/02 20000 20
5 Comfort zone Double bed 12/01/02 15000 20
6 Jerry look Baby cot 24/02/02 7000 19
7 Lion king Office Table 20/02/02 16000 20
8 Royal tiger Sofa 22/02/02 30000 25
9 Park sitting Sofa 13/12/01 9000 15
10 Dine Paradise Dining Table 19/02/02 11000 15
Table: NEWONES
NO ITEMNAME TYPE DATEOFSTOCKS PRICE DISCOUNT
11 White wood Double bed 23/03/03 20000 20
12 James 007 Sofa 20/02/03 15000 15
13 Tom look Baby cot 21/02/13 7000 10
(a) To show all information about the sofas from the INTERIORS table.
(b) To list the ITEMNAME which are priced at more than 10,000 from the
INTERIORS table.
( c) To list ITEMNAME and TYPE of those items, in which DATEOFSTOCK
is before
22/01/02 from the INTERIERS table in the descending order of
ITEMNAME.
(d )To display ITEMNAME and DATEOFSTOCK of those items, in which the
discount
Percentage is more than 15 from INTERIORS table.
( e )To count the number of items, whose type is “Double Bed” from INTERIOR table.
4. Write SQL command for (a) to (e) on the bases of tables FURNITURE AND ARRIVALS.
Table: FURNITURE
(a) To show all information about the baby cots from the FURNITURE table.
(b) To list the ITEMNAME which are priced at more than 15000 from the
FURNITURE table.
(c) To list ITEMNAME AND TYPE of those items, in which DATEOFSTOCK is
before 22/01/02from the FURNITURE table in descending order of
ITEMNAME.
(d) To display ITEMNAME and DATEOFSTOCK of those items, in which
the DISCOUNTpercentage is more than 25 from FURNITURE table.
(e) To insert a new row in the ARRIVALS table with
the following data:14, “Velvet touch”, Double bed”,
{25/03/03}, 25000, 30
5. Write SQL commands for (a) to (e) on the basis of Teacher relation given below:
Relation Teacher
No. Name Ag Department Date of Salary Sex
e join
1. Jugal 34 Computer 10/01/97 12000 M
2. Sharmila 31 History 24/03/98 20000 F
3. Sandeep 32 Maths 12/12/96 30000 M
4. Sangeeta 35 History 01/07/99 40000 F
5. Rakesh 42 Maths 05/09/97 25000 M
6. Shyam 50 History 27/06/98 30000 M
7. Shiv Om 44 Computer 25/02/97 21000 M
8. Shalakha 33 Maths 31/07/97 20000 F
TABLE ACCESSORIES
No Name Price ID
A01 Mother Board
12000
S01
A02 Hard Disk
5000
S01
A03 Keyboard 500 S02
A04 Mouse 300 S01
A05 Mother Board
13000
S02
A06 Keyboard
400
S03
A07 LCD 6000 S04
T08 LCD 5500 S05
T09 Mouse 350 S05
T10 Hard Disk 4500 S03
Write the SQL queries:
(i) To display Name and Price of all the accessories in ascending order of their
Price.
(ii) To display Id and SName of all Shop in Nehru Place.
(iii) To display Minimum and Maximum Price of each Name of accessories.
(iv) To display Name, Price of all accessories and their respective
SName where they are available.
(v) To display all Sname in descending order.
7. Consider the following table GARMENT and FABRIC, Write SQL commands for the
statements (i) to (v)
TABLE GARMENT
TABLE FABRIC
FCODE TYPE
F 04 POLYSTER
F 02 COTTON
F 03 SILK
F01 TERELENE
(i) To display GCODE and DESCRIPTION of each GARMENT in descending order of
GCODE.
(ii) To display the details of all the GARMENT, which have READYDATE in between 08-
DEC-07 and16-JUN-08 (inclusive if both the dates).
(iii) To display the average PRICE of all the GARMENT, which are made up of
fabric with FCODE as F03.
(iv) To display fabric wise highest and lowest price of GARMENT from
GARMENT table. (Display FCODE of each GARMENT along with highest and
lowest Price).
(v) To display Gcode whose Price is more than 1000.
ANSWERS:
CASE STUDY BASED QUESTIONS
1.(a) Select Name From GRADUATE Where DIV = 1 Order by Name;
(b) Select Name, stipend, subject, stepend *12 From
GRADUATE
(c) Select count (*) From GRADUATE
Where subject IN (“PHYSICS”, “COMPUTER SC”);
(d) Insert into GRADUATE Values (11, “KAJOL”, 300, “COMPUTER SC”,
75,1);
(e ) Select name from Graduate where average>65
5
(a) SELECT * FROM Teacher WHERE Department = “History”;
(b) SELECT Name FROM Teacher WHERE Department = “Hindi” and Sex =
“F”;
(c) SELECT Name, Dateofjoin FROM Teacher ORDER BY
Dateofjoin;
d) SELECT Name, Salary, Age FROM Teacher
WHERE Age > 23 AND Sex = ‘M’;
(e ) SELECT COUNT (*) FROM Teacher WHERE Age > 23;
Note: Question paper will be prepared following the General Instructions given below.
General Instructions:
===================*===============*=============*===========
KENDRIYA VIDYALAYA RAIPUR REGION
TERM-2 EXAMINATION 2021-22
SAMPLE QUESTION PAPER_1
CLASS – XII SUB: COMPUTER SCIENCE (083)
Time -90 minutes
M. Marks- 35
General Instructions: Programming language is Python.
• This question paper is divided into 3 sections A, B and C.
• Section A has 7 Questions (1-7).Each question carries 2 marks.
• Section B has 3 Questions (8-10). Each question carries 3 marks.
• Section C has 3 case-based Questions (11-13). Each question carries 4 marks.
• Internal choices have been given for question numbers 7,8 and 12.
Q.N Section A
O.
Each question carry 2 marks
1. Write a function pop() which remove name from stack named "MyStack" 2
2. i) Expand the following- HTTP , ARPANET 1
ii) What is MAC address? Give example also. 1
3 What is the difference between Primary Key and Foreign Key?. 2
4 Explain the following results retrieval methods with examples. fetchone () rowcount 2
() .
5 Consider the following tables GAMES.Give outputs for SQL queries (i) to (iv). 2
Table: GAMES
Section – B
Each question carry 3 marks
8 Write a function in Python PUSH_IN(L), where L is a list of numbers. From 3
this list, push all even numbers into a stack which is implemented by using
another list.
OR
Write a function in Python POP_OUT(Stk), where Stk is a stack implemented
by a list of numbers. The function returns the value which is deleted/popped
from the stack.
9 i) Why is it not allowed to give string and date type argument for Sum() and 1
Avg() functions?
ii)There is column C1 in a table T1.The following two statements:
select count(*) from T1; and select count(C1) from T1; are giving different 2
output.What may be the possible reason?
10 i) Sanghi created two tables with City as Primary Key in Table1 and Foreign key in 1
Table2 while inserting row in Table2 Mr Sanghi is not able to enter value in the
column City. What is the possible reason for it?
ii)The Pincode column of table 'Post' is given below- 2
100001
1200012
1300013
1600017
1800018
i)Display the Trainer Name, City & Salary in descending order of their Hiredate.
ii)To display the TNAME and CITY of Trainer who joined the Institute in the
month of December 2001.
iii) To display TNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER and
COURSE of all those courses whose FEES is less than or equal to 10000.
iv) To display number of Trainers from each city.
13 Riana Medicos Centre has set up its new centre in Dubai. It has four buildings as shown in the diagram 4
given below:
Accounts Lab
Unit
a network expert, provide the best possible answer for the following queries:
(i) Suggest the type of network established between the buildings.
(ii) Suggest the most suitable place (i.e., building) to house the server of this
organization.
(iii) Suggest the placement of the following devices with justification:
(a) Repeater (b) Hub/Switch
(iv) Suggest a system (hardware/software) to prevent unauthorized access to or
from the network.
else:
return False
def POP_OUT(stk):
if isEmpty(stk): # verifies whether the stack is empty or not
print("Stack Underflow")
else: # Allow deletions from the stack
item=stk.pop()
if len(stk)==0:
top=-1
else:
top=len(stk)
return item
( ½ marks for correct POP_OUT() function header)
( ½ mark for checking empty stack status)
( ½ mark for removing item for stack )
( 1 mark for assignment in variable top)
( ½ mark for returning the deleted item)
Q9. i) String and dates are not real numbers that we calculate, so sum() or avg() functions are not valid for them.
ii)There may be a Null value. (1 M for each correct answer)
Q10. I) Mr Sanghi was trying to enter the name of City in Table2 which is not present in Table1
i.e. Referential Integrity ensures that value must exist in referred table.
i) i) 100001 ii)No output (1 M for each correct answer)
Q11. (i)SELECT TNAME, CITY, SALARY FROM TRAINER ORDER BY HIREDATE;
(ii)SELECT TNAME, CITY FROM TRAINER WHERE HIREDATE BETWEEN ‘2001-12-01’ AND ‘2001-
12-31’;
(iii)SELECT TNAME,HIREDATE,CNAME,STARTDATE FROM TRAINER, COURSE WHERE
TRAINER.TID=COURSE.TID AND FEES<=10000;
(iv) SELECT CITY, COUNT(*) FROM TRAINER GROUP BY CITY;
(1 M for each correct query)
Q12. i) a. Star Topology b. Bus Topology (1M for each correct answer)
ii) a) RJ-45: RJ45 is a standard type of connector for network cables and networks. It is an 8-pin
connector usually used with Ethernet cables.
(b)Ethernet: Ethernet is a LAN architecture developed by Xerox Corp along with DEC and Intel. It
uses a Bus or Star topology and supports data transfer rates of up to 10 Mbps. (1M for each correct
answer)
OR
A protocol means the rules that are applicable for a network or we can say that the common set
of rules used for communication in network. Different types of protocols are : (i) HTTP : Hyper
Text Transfer Protocol (ii) FTP : File Transfer Protocol (iii) SLIP : Serial Line Internet Protocol (iv)
PPP : Point to Point Protocol (v) TCP/IP : Transmission Control Protocol/ Internet Protocol. ((1M
for each correct definition and ½ M for each correct name))
Q13.i) LAN
ii) Research Lab
iii) hub in each building
iv)Firewall
(1 M for each correct answer)
Q.NO Section A M
.
Each question carry 2marks
1. Write a function Push() which takes number as argument and add in a stack 2
"MyValue"
2. Write two advantages and two disadvantages of network. 2
3 What is the difference between where and having clause in SQL. 2
4 Write a small python program to insert a record in the table books with attributes 2
(title ,isbn).
5 Consider the following tables FACULTY and COURSES. Write SQL 2
commands for the statements
(i) to (ii) and give outputs for SQL queries (iii) to (iv).
FACULTY
F_ID Fname Lname Hire_date Salary
102 Amit Mishra 12-10-1998 12000
103 Nitin Vyas 24-12-1994 8000
104 Rakshit Soni 18-5-2001 14000
105 Rashmi Malhotra 11-9-2004 11000
106 Sulekha Srivastava 5-6-2006 10000
COURSES
C_ID F_ID Cname Fees
C21 102 Grid Computing 40000
C22 106 System Design 16000
C23 104 Computer Security 8000
C24 106 Human Biology 15000
C25 102 Computer Network 20000
C26 105 Visual Basic 6000
6 i) What is constraint? 2
ii) What are single row functions ?
7 Make difference between DELETE and DROP command. Explain with suitable 2
examples of each.
OR
Differentiate between Alter and Update Command
Section – B
Each question carry 3 marks
8 Write a function in Python PUSH(Arr), where Arr is a list of numbers. From 3
this list push all numbers divisible by 5 into a stack implemented by using a
list. Display the stack if it has at least one element, otherwise display
appropriate error message.
OR
Write a function in Python POP(Arr), where Arr is a stack implemented by
a
list of numbers. The function returns the value deleted from the stack.
9 Define degree and cardinality. Based upon given table write degree and cardinality. 3
10 In a database there are two tables ‘LOAN’ and ‘BORROWER’ as shown below:
LOAN
Loan_Number Branch_name Amount
L-170 Downtown 3000
L-230 RedWood 4000
BORROWER
Customer_Name Loan_number
Jones L-170
Smith L-230
Hayes L-155
(iii) How many rows and columns will be there in the natural join of these
two tables?
Section – C
Each question carry 4 marks
11 Consider the following table WORKERS and DESIG. Write SQL commands for
the the statements (i) to (iv) .
WORKERS
W_ID FIRSTNAME LASTNAME ADDRESS CITY
102 Sam Tones 33 Elm St. Paris
105 Sarah Ackerman 440 U.S 110 New York
144 Manila Sengupta 24 Friends Street New Delhi
210 George Smith 83 First Street Howard
255 Mary Jones 842 VineAve. Lsantiville
300 Robert Samuel 9 Fifth Cross Washington
335 Henry Williams 12 Moore Street Boston
403 Ronny Lee 121 Harrison St. New York
451 Pat Thompson 11 Red Road Paris
DESIG
W_ID SALARY BENEFITS DESIGNATION
102 75000 15000 Manager
105 85000 25000 Director
144 70000 15000 Manager
210 75000 12500 Manager
255 50000 12000 Clerk
300 45000 10000 Clerk
335 40000 10000 Clerk
403 32000 7500 Salesman
451 28000 7500 Salesman
(i) To display W_ID Firstname, Address and city of all employees living in New
York from the table WORKERS.
(ii) To Display the content of WORKERS table in ascending order of LASTNAME.
(iii) To display the Firstname ,Lastname and Total Salary of all Clerks from the
tables WORKERS and DESIG , Where Total Salary is calculated as a Salary
+Benefits.
(iv) To display the Minimum salary among Managers and Clerks from the table
DESIG.
12 i) Define the following data communicating devices: 2
(a) Repeater (b)Gateway
OR
Define the following: (i)3G (ii)SMS
ii) Write the two advantages and two disadvantages of Bus Topology in network. 2
13 Multipurpose Public School, Bengaluru is Setting up the network between its Different Wings of 4
school campus.
There are 4 wings named as SENIOR(S), JUNIOR(J), ADMIN(A) and HOSTEL(H).
Distance between various wings are given below:
Wing A to Wing S 100m
Wing A to Wing J 200m
Wing A to Wing H 400m
Wing S to Wing J 300m
Wing S to Wing H 100m
Wing J to Wing H 450m
a. Suggest the best wired medium and draw the cable layout to efficiently connect
various wings of Multipurpose Public School, Bengaluru.
b. Name the most suitable wing where the Server should be
installed. Justify your answer.
c. Suggest a device/software and its placement that would provide
data security for the entire network of the School.
d. Suggest a device and the protocol that shall be needed to provide wireless
Internet access to all smartphone/laptop users in the campus of Multipurpose
Public School, Bengaluru.
Marking Scheme_2
Section –A
Q1. MyValue=[]
def Push(value):
MyValue.append(value)
(2 M for correct code)
Q2. Advantages of network:
(a) We can share resources such as printers and scanners.
(b) We can share data and access files from any computer.
Disadvantages of network:
(a) If there is any problem in the server, then no communication can take place.
(b) Network faults can cause loss of data.
(c) If there is no privacy mechanism used then the entire network can be accessed by an
unauthorized
person.
Q3. Where is used with single row function where as having is used with group row function.
example- select designation,sum(salary) from desig group by designation having count(*) < 3;
select sum(benefits) from workers where designation = ‘salesman’;
(1 m for difference and 1 m for example)
Q4. import mysql.connector as Sqlator
conn =sqlator.connect(host=”localhost”,user=”root”,passwd=””,database=”test”)
cursor=con.cursor()
query=”INSERT into books(title,isbn) values(‘{}’{})”.format(‘Neelesh’,’5143’)
cursor.execute(query)
con.close()
(2m for correct code)
ii) Single Row Function work with a single row at a time. A single row function returns a result for
every row of a quired table
Examples of Single row functions are Sqrt(), Concat(), Lcase(), Upper(), Day(), etc.
(1 M for each correct answer)
Q7. DELETE is DML command while DROP is a DDL command. Delete is used to delete rows from a
table while DROP is used to remove the entire table from the database. (2 M for correct
difference)
OR
Alter command in DDL command but update command is DML Command.
Alter command is used to add,modify and delete a column from the table and update command is
used to make changes in the record of the table
OR
def popStack(st) :
# If stack is empty
if len(st)==0:
print("Underflow")
else:
L = len(st)
val=st[L-1]
print(val)
st.pop(L-1)
(3 M for correct code)
Q9. No of attributes called degree and no. of tuples called cardinality. (1 M for each correct
definition)
4 degree , 5 cardinality (1/2 M for each correct value)
(ii) Loan_Number
Q11. i)SELECT W_ID, Firstname, Address, City FROM workers WHERE City = ‘New York’;
(ii) SELECT * FROM Workers ORDER BY LASTNAME;
(iii) SELECT Firstname,Lastname, Salary + Benefits “Total Salary” FROM Workers,Desig
WHERE Workers.W_ID = Desig.W_ID AND Designation = ‘Clerk’;
(iv) SELECT Designation, Min(salary) FROM Desig GROUP BY Designation HAVING
Designation IN (‘Manager’,’Clerk’);
(1 M for each correct query)
(b) Gateway: A gateway operates on all the seven layers of OSI model. A network gateway is a
computer
which has internet-working capability of joining together two networks that use different base
protocols. Gateway converts one protocol to another and can, therefore, connect two dissimilar
networks.
OR
i) 3G: 3G (Third Generation) mobile communication technology is a broadband, packet-based
transmission of text, digitized voice, video and multimedia at data rates up to 2 mbps, offering a
consistent set of services to mobile computer and phone users no matter where they are located in
the world.
(ii)SMS: SMS (Short Message Service) is the transmission of short text messages to and from a
mobile phone, fax machine and IP address.
(1 M for each correct answer)
ii) Advantage: Easy to connect a computer or peripheral to a linear bus. Requires less cable length
than a star topology.
Disadvantage : Slower as compared to tree and star topologies of network. Breakage of wire at any
point disturbs the entire
Q13. a) Best wired medium- Twisted pair cable
Senior Junior
Admin Hostel
( ½ mark for correct wire medium and ½ mark for correct cable layout)
b)The server should be installed at Wing S(Senior) as per 80-20 rule i.e. maximum traffic should be local and
minimum traffic should pass over backbone.
( ½ mark for correct server block and ½ mark for correct justification)
c) Firewall.
( 1 mark for correct answer, No partial marking)
d) Device: Wireless Access Point or Router or WiFi hotspot device or Wifi Dongle
Protocol: IEEE 802.11x or TCP/IP
( ½ mark for correct Device and ½ mark for correct protocol)
Section –A
Each question carries 2 marks
(ii) Write one advantage of star topology over bus topology. (1)
Table: COURSE
7. (2)
TABLE: FACULTY
Table: GAMES
Table: PLAYER
Pcode Name GCode
1 Nabi Ahmad 101
2 Ravi Sahai 108
3 Jatin 101
4 Nazneen 103
5 Anand 108
SECTION – B
Each question carries 3
marks
OR
Aryan 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 odd numbers into
a stack.
● Pop and display the content of the stack.
For Example:
If the sample Content of the list is as follows:
Num=[31, 55, 76, 89, 21, 45, 76, 68 ]
Sample Output of the code should be:
45 21 89 31
9. (i) A table, PERSON is created with following attributes: (1)
P_Id LastName FirstName Address City
Recipients
RecID SenderID RecName RecAddress recCity
(ii) What is the difference between star topology and bus topology (2)
of network?
13. Shiva Multi Tech Corporation (SMTC) has set up its new center at four offices
(4)
for web based activities. The 4 blocks of buildings are as shown in the
diagram below:
Block A Block C
Block D
Block B
Number of Computers
Black A 25
Block B 50
Block C 125
Block D 10
(a) Which of the following devices will be suggested by you to connect each
computer in each of the block? ● Gateway ● Switch ● Modem .
[
(b) Suggest the most suitable place (i.e. block) to house the server of this organisation with
a suitable reason.
(c) What will be the best possible connectivity out of the
following, you will suggest to connect the new setup of offices
in Bengalore with its London based office?
● Infrared ● Satellite Link ● Ethernet Cable
(d) Company is planning to connect its Block in Hyderabad
which is more than 20 km. Which type of network will be
formed?
[1]
KENDRIYA VIDYALAYA SANGATHAN
REGIONAL OFFICE RAIPUR
MARKING SCHEME SAMPLE PAPER – 3 TERM2 EXAM-2021-22
CLASS XII - 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
Section -A
Each question carries 2
marks
Q. Part Question Marking Mark
No No. Instructio s
ns
1. Algorithm Steps
2 marks
for correct (2)
1. if (Top == − 1) write “Stack is empty” and answer.
go to step 4
2. ITEM = data [Top]
3. Top = Top − 1
4. Stop.
2. (i) POP : Post Office Protocol ½ mark for
HTTP: Hypertext Transfer each (1)
correct
Protocol
expansion
(ii) Advantage of star topology over bus topology : 1 mark for
The star topology is the most reliable as there is each (1)
a direct connection of every nodes in the network correct
with the central node, so any problem in any answer
node will affect the particular node only
3. Degree: The number of attributes or columns in 1 mark for
a table is called the degree of the table. The correct
degree of the given table is 3. difference.
1 mark for
Cardinality: The number of rows or records in a correct
table is called the cardinality of the table. The degree and (2)
cardinality of the given table is 2. cardinality.
[2]
4. import mysql.connector ½ mark for
mycon = mysql.connector.connect( host = Import statement, (2)
“localhost”, user = “root”, passwd = “tiger”, ½ mark for printing
database = “Python”) connection object.1
print(mycon)
mark for correct
connection
5. The output of the queries (i) to (iv) based on
the table, COURSE.
[4]
S.append(N) 1 mark for
def POP(S): correct POP
if S!=[]:
return S.pop() operation
else:
return None 1 mark for
ST=[] correct
for k in N: function
if k%2!=0: calls
PUSH(ST,k) and
while True: displaying
if ST!=[]: the output
print(POP(ST),end=" ")
else:
break
Section C
Each question carries 4 marks
11 (a)SELECT SenderName FROM Sender where
. Sendercity = ‘Mumbai’;
[6]
FROM EMPLOYEE
GROUP BY DEPTID;
(b) SELECT NAME, DEPTNAME FROM 1 mark
EMPLOYEE, DEPARTMENT WHERE for each
EMPLOYEE.DEPTID= correct
DEPARTMENT.DEPTID query (4)
AND SALARY>50000;
[7]
13
. (a) Switch
(b) Block C
(c) Satellite Link
(d) MAN
(4)
[1]
KENDRIYA VIDYALAYA SANGATHAN
REGIONAL OFFICE RAIPUR
Sample Question Paper - 4 TERM2 EXAM-2021-22
CLASS XII - 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.
Section -A
Each question carries 2 marks
3. What is a primary key? How many primary keys can be there (2)
in a table?
[2]
Write the output of the queries (a) to (d) based on the (2)
5. table, TRANSACT given below:
Table: TRANSACT
(3)
8 Ashish students of class XII wants to enter details of student’s- Rollno, Name and grade in a stack.
Help him to write Push() methods in Python to add student’s details. Display the student’s details.
OR
9 (i) A table, STUDENT has been created in a database with the following fields. (1)
ROLLNO, SNAME, FNAME, ADDRESS, PER, GRADE
Give the SQL command to delete a field, ADDRESS from the table.
(ii) What is the differences between HAVING clause and WHERE clause? (2)
10 Sagar has to create a database EMPDATA for his company and he wants to enter details of all the (3)
employees in the table EMPLOYEE. Table has the following structure: Table: EMPLOYEE
[4]
(4)
Consider the following tables GAMES and PLAYER. Write SQL commands for the
11 statements (i) to (iv) and give outputs for SQL queries (v) to (viii).
Table: GAMES
12 (i) Give one advantage and one disadvantage of Bus topology (2)
OR
Define the following terms:
URL, IP Address
13 Himalaya Corporation has set up its new centre at New Delhi for its office and web-based (4)
activities. It has 4 blocks of buildings.
Himalaya Corporation
Block B
Block A
Block C Block D
[5]
Distance between the various blocks is as
follows:
A to B 50 m
B to C 110m
C to D 105 m
A to D 165 m
B to D 45 m
A to C 40 m
(d) Which fast and very effective wireless transmission medium should
preferably be used to connect the head office at Mumbai with the centre
at New Delhi?
[6]
KENDRIYA VIDYALAYA SANGATHAN
REGIONAL OFFICE RAIPUR
MARKING SCHEME SAMPLE PAPER – 4 TERM2 EXAM-2021-22
CLASS XII - COMPUTER SCIENCE (Code: 083)
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
Section -A
Each question carries 2 marks
[8]
SECTION – B
Each question carries 3 marks
8. # Question No 8 (first option)
def push(stack): 1 mark for
s=[] correct
s.append(input(“Enter student rollno?”)) PUSH
s.append(raw_input(“Enter student name”)) operation
s.append(raw_input(“Enter student grade”))
1 mark for
stack.append(s) correct
display()
def display (stack): operation
l=len(stack)
1 mark for
print “STACK CONTENTS”
correct
for i in range(l-1,-1,-1): function (3)
print stack[i] calls and
entering the
stack=[] values for
print “Creating Stack” students.
n = input(“Enter the number of students”)
for i in range(n):
student = []
student.append(input(“Enter student rollno?”))
student.append(raw_input(“Enter student name”))
student.append(raw_input(“Enter student grade”))
stack, append(student) push(stack)
display(stack)
OR
# Question No 8 (second option)
[1]
1.5 mark for
stk=[]
top=-1 correct POP
def POP(): operation
if(top==-1):
print(“NO STUDENT DATA”) 1.5 mark for
else: correct
function calls
and
print(“Student details are:”, stk.pop())
displaying
top=len(stk)-1
the output
def display():
if(top==-1):
Note: Marks
print(“NO STUDENT DATA”)
to be
else:
awarded for
t=len(stk)-1
any other
print(stk[t])
correct logic
for i in range(t-1,-1,-1):
given by the
print(stk[i]) student
display()
POP()
9. (i) ALTER TABLE STUDENT DROP COLUMN ADDRESS; 1 mark for
correct (1)
command
(ii) Differences between HAVING clause and WHERE clause 2 Marks for (2)
are: 02 correct
HAVING: difference.
HAVING clause is used to filter record from the groups
based on the specified condition.
HAVING clause implements in column operation.
HAVING clause can contain aggregate function.
WHERE:
WHERE clause is used to filter the records from the table
based on the specified condition.
WHERE clause implements in row operation.
WHERE clause cannot contain aggregate function.
12 12 Bus topology: A bus topology is an arrangement in which the computers and the 1 Mark each (2)
peripheral devices are connected to a common single data line. for
Advantage: All the nodes are connected directly, so very short cable length is advantage &
1 Mark for
required.
disadvantag
Disadvantage: In case of any fault occurred in data transmission, fault isolation e
is very difficult. We have to check the entire network to find the fault.
OR
URL: A uniform resource locator, abbreviated URL, also known as web address,
is a specific character string that constitutes a reference to a resource. In most
web browsers, the URL of a web page is displayed on top inside an address bar.
A URL is a formatted text string used by web browsers.
IP Address (Internet Protocol Address) :The Internet Protocol (IP) is the
method or protocol by which data is sent from one computer to another on the
Internet. Each computer (known as a host) on the Internet has atleast one IP
address that uniquely identifies it from all other computers on the Internet.
1 Mark each
for correct
def. of URL
and IP
Address.
1 Mark for
each correct
answer.
Block C Block D
[4]
KENDRIYA VIDYALAYA SANGATHAN
REGIONAL OFFICE RAIPUR
SAMPLE PAPER – 5 TERM2 EXAM-2021-22
CLASS XII - COMPUTER SCIENCE (Code: 083)
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
Section -A
Each question carries 2 marks
3. Write two wild card characters which are used with like operator? (2)
[5]
5. Write the output of the following on the basis of given (2)
Table : Product
OR
Is NULL value the same as 0 (zero)? Write the reason for
your answer.
SECTION-B
Each question carries 3 marks
8 Write a function in python, MakePush(Package) and MakePop(Package) to 3
add a new Package and delete a Package from a List of Package
Description, considering them to act as push and pop operations of the
Stack data structure.
OR
Write a function in python, Push(Stu) and MakePop(Stu) to add a new
student and delete student from a List of Stu contain rollno, Sname and
Class as list, considering them to act as push and pop operations of the
Stack data structure
[1]
9 (i) There is a column Salary in a Table EMPLOYEE. The following two 1
statements are giving different outputs. What may be the possible reason?
SELECT COUNT(*) FROM EMPLOYEE;
SELECT COUNT(SALARY) FROM EMPLOYEE;
(ii) Shanya Khanna is using a table Employee. It has the following columns. 2
Admno, Name, Agg, Stream [ column Agg contains aggregate marks] She
wants to display highest Agg in each stream.
She wrote the following statement:
SELECT Stream, MAX(Agg) FROM Employee;
But she did not get the desired result. Rewrite the above query with
necessary changes to help her get the desired output.
10 In a database STUDENT, there is a Table RESULT with the following 3
contents:
Table :RESULT
REGN NAME MARKS SECTIO CLASSTEAC ADMN
O N HER O
10004 Mohit 90 A Ms Nathani Z101
10211 Mukta 85 B Mr. Gokhle Z109
10923 Mohit 92 B Mr. Gokhle Z120
10313 Sana 80 A Ms Nathani Z234
(i) Identify the attributes, which can be chosen as Candidate Keys in the
table RESULT.
(ii) Write SQL Query to change the Marks of Mukta to 95 in the table
RESULT.
11 In a database there are two tables “ITEM” and “CUSTOMER” as shown 4
below:
(ii) Write one advantage and one disadvantage of using Optical fiber cable. 2
13 ABC Consultants are setting up a secured network for their office campus 4
at Gurgaon for their day-to-day office and web-based activities. They are
planning to have connectivity between three buildings and the head office
situated in Mumbai. Answer the questions (i) to (iv) after going through
the building positions in the campus and other details, which are given
below :
[3]
i. Suggest the most suitable place (i.e., building) to house the server of
this organization. Also give a reason to justify your suggested
location.
ii. Suggest a cable layout of connections between the buildings inside the
campus.
[4]
iii. Suggest the placement of the following devices with justification:
o Modem.
o Switch.
iv. The organization is planning to provide a high speed link with its head
office situated in Mumbai using a wired connection. Which of the
following cables will be most suitable for this job ?
o Optical Fiber
o Co-axial Cable
o Ethernet Cable
[5]
KENDRIYA VIDYALAYA SANGATHAN
REGIONAL OFFICE RAIPUR
MARKING SCHEME SAMPLE PAPER – 5 TERM2 EXAM-2021-22
CLASS XII - COMPUTER SCIENCE (Code: 083)
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
Section -A
Each question carries 2 marks
Q. Part Question Marks
No No.
1. Push operation refers to inserting an element in the stack. Since there's (2)
only one position at which the new element can be inserted — Top of
the stack, the new element is inserted at the top of the stack
2. (i) Voice over internet protocol (1)
Wide Area Network
(ii) 1. It is wireless network. (1)
2. It is for short range.
[6]
5 Ans.a. 320 2
Ans b.
240
300
320
130
100
Ans c. Error
Ans. d. 5
6. (i) Ans. Duplication of data in a table is called redundancy. (1)
(ii) Data integrity means maintaining accuracy and consistency of data. (1)
7 Table ‐ Patient 2
Columns ‐ PatientId,
PatientName, WardId
Patient Id ‐ Primary Key and
WardId ‐ Foreign Key
(You can also mention other appropriate table with suitable columns)
OR
Null value indicates nothing or empty value. It does not
represent 0 or space character.
The column having Null value is ignored while applying
aggregate functions like MIN, MAX or COUNT etc.
SECTION-B
Each question carries 3 marks
def MakePush(Package): 3
a=int(input("enter package title : "))
Package.append(a)
def MakePop(Package):
if (Package==[]):
print( "Stack empty")
else:
print ("Deleted element:",Package.pop())
OR
def Push(Stu):
rollno=int(input("enter package title : "))
Sname=int(input("enter package title : "))
Class=int(input("enter package title : "))
info=[rollno,Sname,Class]
[7]
Stu.append(info)
def Pop(Stu):
if (Stu==[]):
print( "Stack empty")
else:
print ("Deleted element:",Stu.pop())
[8]
( iii ) Modem -Red Building
In the layout a switch each, would be needed in all the buildings, to
interconnect the group of cables from the different computers in each
in
In the layout a switch each, would be needed in all the buildings, to
interconnect the group of cables from the different computers in each
building.
[9]
KENDRIYA VIDYALAYA SANGATHAN
REGIONAL OFFICE RAIPUR
SAMPLE PAPER – 6 TERM2 EXAM-2021-22
CLASS XII - COMPUTER SCIENCE (Code: 083)
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
Section -A
Each question carries 2 marks
Q. Part Question Marks
No No.
1. Explain Push and POP operation of stack. (2)
2. (i) Expand the following: (1)
1. GSM
2. GPRS
A. fetchone ()
B. fetchall ()
[10
]
5. Answer the following questions on the basis the given table. (2)
(ii) Which statement is used to show all existing table in database. (1)
7 Prathmesh has created the following table with the name ‘Veterinary’. (2)
OR
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
Section -A
Each question carries 2 marks
Q. Part Question Marks
No No.
1. Push operation refers to inserting an element in the stack. Since there's (2)
only one position at which the new element can be inserted — Top of
the stack, the new element is inserted at the top of the stack. Pop
operation refers to the removal of an element. .
2. (i) 1. GSM: Global System for Mobile Communication. (1)
2. GPRS: General Packet Radio Service.
(ii) Telnet: It is an older internet utility that lets us log on to remote (1)
computer system. It also facilitates for terminal emulation purpose.
3. (2)
.
4. (A) fetchone() :- The fetchone() method will return only one row from (2)
the result set in the form of tuple containing a record.
(B) fetchall() :- The fetchall() method return all the rows from the result
set in the form of a tuple congaing the records.
Ans. degree – 5
Ans. Cardinality – 2
6. (i) use student; (1)
OR
CREATE TABLE BANK (Acct_number INTEGER (4) PRIMARY
KEY, Name VARCHAR(3) ,BirthDate DATE, Balance INTEGER ( 8 )
NOT NULL);
Section -B
8 def Push(Package): 3
Empid=int(input(“Enter Id of Employee: "))
Ename=input(“Enter Name of employee”)
Salary= int(input(“Enter Salary of an employee”))
T=(Empid, Ename ,Salary)
Package.append(T)
def Pop(Package):
if (Package==[]):
print( "Stack empty")
else:
print ("Deleted element:",Package.pop())
OR
PUSH OPERATION ON STACK
// function to push an item of integer type into stack
stack=[ ]
def push (stack):
item=int(input(“Enter the values of item”))
stack.append(item)
// function to push information of student include rollno and name in the
form of list, tuple, dictionary
stack=[ ]
def push (stack):
rollno=int(input(“Enter rollno of student”))
name =input(“Enter Name of student”)
item=(rollno, name) \\ [rollno, name] \\ {rollno : “name”} \\ as per the
problem
stack.append(item)
( iii) Switch
(iv ) Satellite link