CBSE-XII - Computer Science-2017
CBSE-XII - Computer Science-2017
COMPUTER SCIENCE
General Instructions :
(v) It is compulsory to mention on the page 1 in the answer book whether you
are attempting SECTION A or SECTION B.
91 12
I1=INVENTORY()
I2=INVENTORY(105,"Thumb Pin",50)
I3=INVENTORY(102,"U Clip")
I1.Procure(25)
I2.Issue(15)
I3.Procure(50)
I1.Status()
I3.Status()
I2.Status()
(f) What are the possible outcome(s) executed from the following code ?
Also specify the maximum and minimum values that can be
assigned to the variable N. 2
import random
NAV = ["LEFT","FRONT","RIGHT","BACK"];
NUM = random.randint(1,3)
NAVG = ""
for C in range (NUM,1,-1):
NAVG = NAVG+NAV[I]
print NAVG
Instance Attributes
- BoxID # Numeric value with a default value 101
- Side # Numeric value with a default value 10
- Area # Numeric value with a default value 0
Methods :
- ExecArea() # Method to calculate Area as
# Side * Side
- NewBox() # Method to allow user to enter values of
# BoxID and Side. It should also
# Call ExecArea Method
- ViewBox() # Method to display all the Attributes
91 14
3. (a) What will be the status of the following list after the First, Second
and Third pass of the bubble sort method used for arranging the
following elements in ascending order ? 3
Note : Show the status of all the elements after each pass very
clearly underlining the changes.
52, 42, –10, 60, 90, 20
4. (a) Differentiate between file modes r+ and rb+ with respect to Python. 1
91 15 P.T.O.
class Factory :
def __init__(self,FID,FNAM):
self.FCTID = FID # FCTID Factory ID
self.FCTNM = FNAM # FCTNM Factory Name
self.PROD = 1000 # PROD Production
def Display(self):
print self.FCTID,":",self.FCTNM,":", self.PROD
SECTION C
[For all the candidates]
5. (a) Observe the following table MEMBER carefully and write the name
of the RDBMS operation out of (i) SELECTION (ii) PROJECTION
(iii) UNION (iv) CARTESIAN PRODUCT, which has been used to
produce the output as shown in RESULT. Also, find the Degree and
Cardinality of the RESULT : 2
MEMBER
NO MNAME STREAM
RESULT
NO MNAME STREAM
(b) Write SQL queries for (i) to (iv) and find outputs for SQL queries (v)
to (viii), which are based on the tables. 6
91 16
DVD
MEMBER
91 17 P.T.O.
6. (a) State DeMorgan‖s Laws of Boolean Algebra and verify them using
truth table. 2
(b) Draw the Logic Circuit of the following Boolean Expression using
only NOR Gates : 2
(A+B).(C+D)
(d) Reduce the following Boolean Expression to its simplest form using
K-Map : 3
E (U , V , Z , W ) = (2 , 3 , 6 , 8 , 9 , 10 , 11 , 12 , 13 )
(b) Janish Khanna used a pen drive to copy files from his friend‖s laptop
to his office computer. Soon his computer started abnormal
functioning. Sometimes it would restart by itself and sometimes it
would stop different applications running on it. Which of the
following options out of (i) to (iv), would have caused the
malfunctioning of the computer ? Justify the reason for your chosen
option : 2
(i) Computer Virus
(ii) Spam Mail
(iii) Computer Bacteria
(iv) Trojan Horse
91 18
(c) Ms. Raveena Sen is an IT expert and a freelancer. She recently used
her skills to access the Admin password for the network server of
Super Dooper Technology Ltd. and provided confidential data of the
organization to its CEO, informing him about the vulnerability of
their network security. Out of the following options (i) to (iv), which
one most appropriately defines Ms. Sen ? 2
Justify the reason for your chosen option :
(i) Hacker
(ii) Cracker
(iii) Operator
(iv) Network Admin
91 19 P.T.O.
Number of computers installed at various blocks are as follows :
Accounts Block 30
Admin Block 40
91 20 1,03,000