Cbse Questions Paper Solution - 2021-22: Subject: Computer Science Term-Ii
Cbse Questions Paper Solution - 2021-22: Subject: Computer Science Term-Ii
7. Candidate keys Attributes that can be used to uniquely identity the tuples in the relation are
called candidate keys.
Primary keys Out of one or more candidate keys, The attribute chosen to uniquely identify
the tuples in a relation a called the primary key
OR
(a) Primary key :- PNO
(b) Degree – Number of columns/attributes/fields in relation is called degree of table PLAYER
is 3.
SECTION-B
8. def Push (A, word) :
A. append (word)
def PushNV(N):
for word in N
flag = true
for ch in word
if ch in „aeiou AEIOU‟:
flag = false
break
if flag:
NoVowel.append (word)
def Pop (Nov):
3
if NOV! = [ ]:
return NOV.Pop [ ]
else :
return None
NoVowel = [ ]
all = [ ]
for count in range (5):
word = input (“Enter a word”)
Push (All, word)
PushNV (All)
while true :
if NoVowel ! = [ ]:
print (Pop(NoVowel), end = "")
else :
print (“Emptystack”)
break
>>> Enter a word : [‘DRY’, ‘LIKE’, ‘RHYTHM’, ‘WORK’, ‘ GYM’]
gym rhythm dry “Emptystack”
OR
def Push 3_5 [N]
for NUM in N:
if NUM % 3 = = 0 or NUM%5 = = 0 :
Only 3_5.append (NUM)
def Pop(NOV):
if NOV! = [ ]
return NOV. Pop [ ]
else :
return None
Only 3_5= [ ]
NUM = [ ]
for count in range [5]:
NUM = int(input(“Enternumbers:”))
NUM.append (NUM)
Push 3_5(NUM)
while true:
if only 3_5! = [ ]:
return None
Only 3_5 = [ ]
4
NUM = [ ]
for count in range [5]
NUM = int(input(“Enter numbers:”))
NUM.append (NUM)
Push 3_5(NUM)
while true:
if Only 3_5! = [ ]:
print (Pop(only 3_5), end = "")
else:
print (“Emptystack”)
break
>>> enter the list of 5 integers:[10,6,14,18,30]
>>> NUM:[10,6,14,18,30]
>>> [10,6,18,30]
>>>30 18 6 10 Stack Empty
9. (i) ALTER table ITEMS DROP DISCOUNT;
(ii) DDL- CREATE, DROP
DML-UPDATE, INSERT
10. (a) USE LIBRARY;
(b) SHOW TABLES;
(c) DESC BOOKS; OR DESCRIBE BOOKS;
SECTION-C
11. (a) UPDATE FLIGHT SET FARE = 6000 WHERE FNO=”F104‟
(b) SELECT GENDER ,COUNT(*) FROM PASSENGER GROUP BY GENDER
(c) SELECT NAME, FARE, F_DATE FROM FLIGHT F, PASSENGER P, WHERE P.FNO = F,
NO AND START = „DELHI‟;
(d) DELETE FROM FLIGHT WHERE “END = „MUMBAI‟;
12. (i) The difference between Tree Topology and Bus Topology are as follows :
Admin
Block
Sales
Accounts Block
Block