0% found this document useful (0 votes)
22 views9 pages

CBSE-XII - Computer Science 2017 (Delhi)

The document contains instructions for a computer science exam. It specifies that candidates must attempt either Section A in C++ or Section B in Python, and Section C is compulsory. Section B contains 7 questions on Python concepts like variables, functions, classes, lists and methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

CBSE-XII - Computer Science 2017 (Delhi)

The document contains instructions for a computer science exam. It specifies that candidates must attempt either Section A in C++ or Section B in Python, and Section C is compulsory. Section B contains 7 questions on Python concepts like variables, functions, classes, lists and methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

SET – 4

Series : GBM/1 Code No. 91/1


Candidates must write the Code on
Roll No. the title page of the answer-book.

• Please check that this question paper contains 16 printed pages.


• Code number given on the right hand side of the question paper should be written on the
title page of the answer-book by the candidate.
• Please check that this question paper contains 7 questions.
• Please write down the Serial Number of the question before attempting it.
• 15 minute time has been allotted to read this question paper. The question paper will be
distributed at 10.15 a.m. From 10.15 a.m. to 10.30 a.m., the students will read the

m
question paper only and will not write any answer on the answer-book during this period.

co
COMPUTER SCIENCE a.
Time allowed : 3 hours Maximum marks : 70
di
General Instructions :
(i) Programming Language in SECTION A : C++.
in

(ii) Programming Language in SECTION B : Python.


er

(iii) Answer either SECTION A or B, and SECTION C is compulsory.


(iv) It is compulsory to mention on the page 1 in answer book whether you are
e

attempting SECTION A or SECTION B.


ar

(v) All questions are compulsory within each section.


.c
w
w
w

91/1 1 [P.T.O.
SECTION – B
(Only for Candidates, who opted for Python)
1. (a) Which of the following can be used as valid variable identifier(s) in Python ? 2
(i) total
(ii) 7Salute
(iii) Que$tion
(iv) global

(b) Name the Python Library modules which need to be imported to invoke the
following functions : 1
(i) ceil()
(ii) randint()

(c) Rewrite the following code in Python after removing all syntax error(s). Underline
each correction done in the code. 2
TEXT=""GREAT

m
DAY""
for T in range[0,7]:

co
print TEXT(T)
print T+TEXT a.
(d) Find and write the output of the following Python code : 2
STR = ["90","10","30","40"]
di
COUNT = 3
SUM = 0
in

for I in [1,2,5,4]:
S = STR[COUNT]
SUM = float (S)+I
er

print SUM
COUNT–=1
e
ar

(e) Find and write the output of the following Python code : 3
class ITEM:
def_init_(self,I=101,N="Pen",Q=10): #constructor
.c

self.Ino=I
self.IName=N
w

self.Qty=int(Q);
def Buy(self,Q):
w

self.Qty = self.Qty + Q
w

def Sell(self,Q):
self.Qty –= Q
def ShowStock(self):
print self.Ino,":",self.IName,"#",self.Qty
91/1 9 [P.T.O.
I1=ITEM()
I2=ITEM(100,"Eraser",100)
I3=ITEM(102,"Sharpener")
I1.Buy(10)
I2.Sell(25)
I3.Buy(75)
I3.ShowStock()
I1.ShowStock()
I2.ShowStock()

(f) What are the possible outcome(s) executed from the following code ? Also specify
the maximum and minimum values that can be assigned to variable N. 2
import random
SIDES=["EAST","WEST","NORTH","SOUTH"];
N=random.randint(1,3)

m
OUT=""
for I in range(N,1,–1):
OUT=OUT+SIDES[I]

co
print OUT
(i) SOUTHNORTH (ii) SOUTHNORTHWEST
a.
(iii) SOUTH (iv) EASTWESTNORTH
di

2. (a) List four characteristics of Object Oriented Programming. 2


rin

(b) class Test: 2


rollno=1
marks=75
e

def_init_(self,r,m): #function 1
re

self.rollno=r
self.marks=m
a

def assign(self,r,m): #function 2


rollno = n
.c

marks = m
def check(self): #function 3
w

print self.rollno,self.marks
print rollno,marks
w

(i) In the above class definition, both the functions – function 1 as well as
w

function 2 have similar definition. How are they different in execution ?


(ii) Write statements to execute function 1 and function 2.

91/1 10
(c) Define a class RING in Python with following specifications : 4
Instance Attributes
- RingID # Numeric value with a default value 101
– Radius # Numeric value with a default value 10
– Area # Numeric value
Methods :
– AreaCal() # Method to calculate Area as
# 3.14*Radius*Radius
– NewRing() # Method to allow user to enter values of
# RingID and Radius. It should also
# Call AreaCal Method

m
– ViewRing() # Method to display all the Attributes
(d) Differentiate between static and dynamic binding in Python ? Give suitable

co
examples of each. 2
(e) Write two methods in Python using concept of Function Overloading
a.
(Polymorphism) to perform the following operations : 2
di
(i) A function having one argument as side, to calculate Area of Square as
side*side
rin

(ii) A function having two arguments as Length and Breadth, to calculate Area of
Rectangle as Length*Breadth.
e

3. (a) What will be the status of the following list after the First, Second and Third pass
re

of the bubble sort method used for arranging the following elements in descending
order ? 3
a

Note : Show the status of all the elements after each pass very clearly underlining
.c

the changes.
152, 104, –100, 604, 190, 204
w

(b) Write definition of a method OddSum(NUMBERS) to add those values in the list
w

of NUMBERS, which are odd. 3


w

(c) Write Addnew(Book) and Remove(Book) methods in Python to Add a new Book
and Remove a Book from a List of Books, considering them to act as PUSH and
POP operations of the data structure Stack. 4
91/1 11 [P.T.O.
(d) Write definition of a Method AFIND(CITIES) to display all the city names from a
list of CITIES, which are starting with alphabet A. 2

For example :

If the list CITIES contains

["AHMEDABAD","CHENNAI","NEW DELHI","AMRITSAR","AGRA"]

The following should get displayed

AHMEDABAD

AMRITSAR

AGRA

m
(e) Evaluate the following Postfix notation of expression : 2

2,3,*,24,2,6,+,/,–

co
a.
4. (a) Differentiate between file modes r+ and w+ with respect to Python. 1
di
(b) Write a method in Phyton to read lines from a text file DIARY.TXT, and display
those lines, which are starting with an alphabet ‘P’. 2
rin

(c) Considering the following definition of class COMPANY, write a method in


Python to search and display the content in a pickled file COMPANY.DAT, where
e

CompID is matching with the value ‘1005’. 3


re

class Company:
a

def_init_(self,CID,NAM):
.c

self.CompID = CID # CompID Company ID


w

self.CName = NAM # CName Company Name


w

self.Turnover = 1000
w

def Display(self):

print self.CompID,":",self.CName,":",self.Tunover

91/1 12
SECTION – C
(For all the Candidates)

5. (a) Observe the following table CANDIDATE 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
TABLE : CANDIDATE

NO NAME STREAM

C1 AJAY LAW

C2 ADITI MEDICAL

m
C3 ROHAN EDUCATION

co
C4 RISHAV ENGINEERINGa.
RESULT

NO NAME
di

C3 ROHAN
rin

(b) Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii),
e

which are based on the tables : 6


re

TABLE : BOOK

Code BNAME TYPE


a
.c

F101 The priest Fiction


w

L102 German easy Literature


w

C101 Tarzan in the lost world Comic


w

F102 Untold Story Fiction

C102 War heroes Comic

91/1 13 [P.T.O.
TABLE : MEMBER
MNO MNAME CODE ISSUEDATE
M101 RAGHAV SINHA L102 2016-10-13
M103 SARTHAK JOHN F102 2017-02-23
M102 ANISHA KHAN C101 2016-06-12
(i) To display all details from table MEMBER in descending order of
ISSUEDATE.
(ii) To display the BNO and BNAME of all Fiction Type books from the table
BOOK.
(iii) To display the TYPE and number of books in each TYPE from the table
BOOK.
(iv) To display all MNAME and ISSUEDATE of those members from table
MEMBER who have books issued (i.e. ISSUEDATE) in the year 2017.
(v) SELECT MAX(ISSUEDATE) FROM MEMBER;
(vi) SELECT DISTINCT TYPE FROM BOOK;

m
(vii) SELECT A.CODE,BNAME,MNO,MNAME
FROM BOOK A, MEMBER B WHERE A.CODE=B.CODE;

co
(viii) SELECT BNAME FROM BOOK
WHERE TYPE NOT IN ("FICTION","COMIC");
a.
6. (a) State Distributive Laws of Boolean Algebra and verify them using truth table. 2
di
(b) Draw the Logic Circuit of the following Boolean Expression using only NAND
Gates : 2
rin

X.Y + Y.Z
(c) Derive a Canonical SOP expression for a Boolean function F, represented by the
following truth table : 1
e

U V W F(U,V,W)
re

0 0 0 1
0 0 1 0
a

0 1 0 1
.c

0 1 1 1
w

1 0 0 0
1 0 1 0
w

1 1 0 1
w

1 1 1 0
(d) Reduce the following Boolean Expression to its simplest form using K-Map : 3
F(X,Y,Z,W) = Σ(0,1,2,3,4,5,10,11,14)
91/1 14
7. (a) Differentiate between Radio Link and Microwave in context of wireless
communication technologies. 2
(b) Amit used a pen drive to copy files from his friend’s laptop to his office computer.
Soon his office computer started abnormal functioning. Sometimes it would restart
by itself and sometimes it would stop functioning totally. 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 Worm
(ii) Computer Virus
(iii) Computer Bacteria
(iv) Trojan Horse
(c) Jai is an IT expert and a freelancer. He recently used his skills to access the
Administrator password for the network server of Megatech Corpn Ltd. and
provided confidential data of the organization to its Director, informing him about
the vulnerability of their network security. Out of the following options (i) to (iv),

m
which one most appropriately defines Jai ? 2
Justify the reason for your chosen option :

co
(i) Hacker
(ii) Cracker
(iii) Operator
a.
(iv) Network Admin
di
(d) Hi Speed Technologies Ltd. is a Delhi based organization which is expanding its
office setup to Chandigarh. At Chandigarh office campus, they are planning to have
rin

3 different blocks for HR, Accounts and Logistics related work. Each block has
number of computers, which are required to be connected in a network for
communication, data and resource sharing.
e

As a network consultant, you have to suggest the best network related solutions for
re

them for issues/problems raised in (i) to (iv), keeping in mind the distances
between various blocks / locations and other given parameters.
a
.c
w
w
w

91/1 15 [P.T.O.
Shortest distances between various blocks/locations :

HR Block to Accounts Block 400 metres

Accounts Block to Logistics Block 200 metres

Logistics Block to HR Block 150 metres

DELHI Head Office to CHANDIGARH Office 270 km

Number of Computers installed at various blocks are as follows :

HR Block 70

Accounts Block 50

Logistics Block 40

(i) Suggest the most appropriate block/location to house the SERVER in the

m
CHANDIGARH Office (out of the 3 blocks) to get the best and effective
connectivity. Justify your answer. 1

co
(ii) Suggest the best wired medium and draw the cable layout (Block to Block) to
efficiently connect various Blocks within the CHANDIGARH office
a.
compound. 1
di
(iii) Suggest a device / software and its placement that would provide data
security for the entire network of CHANDIGARH office. 1
rin

(iv) Which of the following kind of network, would it be ? 1


e

(a) PAN
re

(b) WAN

(c) MAN
a
.c

(d) LAN
___________
w
w
w

91/1 16

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy