0% found this document useful (0 votes)
13 views

QP PB XII CS

Uploaded by

tezwietiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

QP PB XII CS

Uploaded by

tezwietiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

KENDRIYA VIDYALAYA SANGATHAN, JABALPUR REGION

1ST PRE BOARD EXAMINATION 2019-20


CLASS XII
SUBJECT COMPUTER SCIENCE (NEW) (083)

M.M.: 70 Time: 3 hrs.


Instructions:
 All Questions are compulsory. However Internal Choices in Ques. 2(g), 2(h), 2(i), 2(j)
and 4(e)
 Question Paper is divided into 4 sections A, B, C and D.
 Section A: Unit 1
 Section B: Unit 2
 Section C: Unit 3
 Section D: Unit 4

Section-A
1. (a) Name the Python Library modules which need to be imported to invoke the
following functions:
1
(i) pow( ) (ii) uniform ( )

(b Identify the valid identifiers from following-


f@name, in, FOR, roll no , 12class, addr1 1

(c) Write the type of tokens from the following:


(i) None (ii) str 1

(d Rewrite the following code in python after removing all syntax error(s).
Underline each correction done in the code.
r = input('enter any radius :')
2
a = pi * math.pow(r,2)
print("Area = " + a)

(e) Find and write the output of the following python code: 2

def ChangeList( ):
L=[ ]
L1=[ ]
L2=[ ]
for i in range(1, 10):
L.append(i)

Page 1 of 8
for i in range(10,1,-2):
L1.append(i)
for i in range(len(L1)):
L2.append(L1[i]+L[i])
L2.append(len(L)-len(L1))
print(L2)
ChangeList( )

(f) Find and write the output of the following python code:
def modify(P ,Q=10):
P=P/Q
Q=P%Q
print( P,"#",Q)
return (P)
A=300
3
B=30
A=modify(A,B)
print(A,"$",B)
B=modify(B)
print(A,"$",B)
A=modify(A)
print(A,"$",B)

(g Study the following program and select the possible output(s) from the
options (i) to (iv) following it. Also, write the maximum and the minimum
values that can be assigned to the variable Y.
import random
X= random.random( )
Y= random.randint(0,4)
2
print(int(X),":",Y+int(X))
i. 0:0
ii. 1:6
iii. 2:4
iv. 0:3
v.
2. (a) What is a Python module? 1

Page 2 of 8
(b Which statement is correct for dictionary?
(i) A dictionary is a ordered set of key:value pair
(ii) each of the keys within a dictionary must be unique
1
(iii) each of the values in the dictionary must be unique
(iv) values in the dictionary are immutable

(c) Identify the valid statement for list L=[1,2,”a”]:


(i) L.remove("2")
(ii) L.del(2)
1
(iii) del L[2]
(iv) del L[“a”]

(d Find and write the output of the following python code:


x = "Python"
print(x[ : :-1]) 1

print(x)

(e) Find and write the output of the following python code:
def myfunc(a):
a=a+2 1
a=a*2
return a
print(myfunc(2))
(f) Carefully observe the following Python code and answer the questions that 2
follow:

global x
x=5
def fun2( ):
x=3
print(x)
x=x+1
print(x)
fun2( )

Page 3 of 8
On execution, the above code produces the following output:
6
3
Explain the output with respect to the scope of the variables.

(g Write the specific purpose of functions used in plotting:


i) plot( ) ii) legend( )
OR 2
Write statements for following:
i. Set x and y axis limits to -5 to +5 and -7 to -9 respectively.
ii. To set the ticks on X axis at values (-5,-2,0,+2,+5)
(h Write a function COUNTMY( )in Python to read the text file “STORY.TXT” and
count the number of times “my” occurs in the file.(include MY/my/My/mY in
the counting)
OR 2

Write a function DISPLAYWORDS( ) in python to display the count of words


starting with “t” or “T” in a text file ‘STORY.TXT’.

(i) What is a recursive function? Write one advantage and one limitation of using
recursive function.
OR 3
Write a recursive function recsum(n) that computes the sum of number
1…..n ; get the value of last number n from the user.

(j) Write a program to perform insert and delete operations on a Queue 4


containing Books details as given in the following definition of book node:
bookno integer
Name String
def isEmpty(Qu):
if Qu == [ ]:
return True
else:
return False
def Enqueue(Qu, item):
# Write the code to insert book details using Queue.
def Dequeue(Qu):
# Write the code to delete a book using Queue.
OR
Write a program to perform push and pop operations on a Stack containing
Student details as given in the following definition of student node:
RNo integer
Name String

Page 4 of 8
Age integer
def isEmpty(stk):
if stk == [ ]:
return True
else:
return False
def stkpush(stk, item):
# Write the code to push student details using stack.
def stkpop(stk):
# Write the code to pop a student using stack.

Section-B
3. _________ is Internet-based computing for sharing resources, softwares and
(a) 1
information on demand.

(b ________ is a phenomenon that connects the things(Smart Devices) to the


1
Internet over wired or wireless connections

_______ provides a connection-oriented reliable service for sending


(c) 1
messages.

(d
CSMA/CA is used for _______________ in wireless network 1

Give the full forms of the following:


(i) SMTP
(e) (ii) CDMA 2
(v) WLL
(vi) NFC

The following is a 32-bit binary number, usually represented as 4 decimal


values, each representing 8 bits, in the range 0 to 255 (known as octets)
separated by decimal points.
(f) 2
140.179.220.200
What is it? What is its importance?

Name the network tools used in the given situation—

(g (i) To troubleshoot internet connection problems


3
(ii) To see the IP address associated with a domain name
(iii) To look up the registration record associated with a domain name

(h PVS Computers decided to open a new office at Ernakulum, the office consist 4
of Five Buildings and each contains number of computers. The details are
shown below.

Page 5 of 8
Building-2

Building-1 Building-3

Building-5 Building-4

Distance between the buildings

Computers in each building are networked but buildings are not networked so
far. The Company has now decided to connect building also.
(i) Suggest a cable layout for connecting the buildings
(ii) Do you think anywhere Repeaters required in the campus? Why
(iii) The company wants to link this office to their head office at Delhi
(a) Which type of transmission medium is appropriate for such a link?
(b) What type of network would this connection result into?
(iv) Where server is to be installed? Why?

Section-C
4. (a) fetchone( ) method for fetching each record from Mysql to python is invoked
1
using cursor object. Is it True?

(b What is the default URL of your Django project when you run it on built in
1
server of Django?

(c) Which of the following file is not located in inner Django project folder? 1
i. manage.py
ii. urls.py

Page 6 of 8
iii. _init.py
iv. settings.py
(d
Which command is used to create a new App EXAM in Django project? 1

(e) Differentiate between Primary key and Candidate key.


OR
What is the difference between degree and cardinality of a table? What is the 2
degree and cardinality of the following table?
Eno Name Salary
101 MAHI 45000
102 POOJA 20000
103 50600
(f) What are the basic steps to connect Python with MYSQL using table Doctor
2
present in the database ‘Hospital’?

(g Write a output for SQL queries (i) to (iii), which are based on the table: 3
SCHOOL and ADMIN given below:
TABLE: SCHOOL

COD TEACHERNAM SUBJECT DOJ PERIOD EXPERIENC


E E
1001 RAVI SHANKAR ENGLISH 12/03/200 24 10
0

1009 PRIYA RAI PHYSICS 03/09/199 26 12


8

1203 LISA ANAND ENGLISH 09/04/200 27 5


0

1045 YASHRAJ MATHS 24/08/200 24 15


0

1123 GANAN PHYSICS 16/07/199 28 3


9

1167 HARISH B CHEMISTR 19/10/199 27 5


Y 9

1215 UMESH PHYSICS 11/05/199 22 16


8

TABLE: ADMIN

CODE GENDER DESIGNATION


1001 MALE VICE PRINCIPAL

1009 FEMALE COORDINATOR

1203 FEMALE COORDINATOR

Page 7 of 8
1045 MALE HOD

1123 MALE SENIOR TEACHER

1167 MALE SENIOR TEACHER

1215 MALE HOD

i) SELECT SUM (PERIODS), SUBJECT FROM SCHOOL GROUP BY SUBJECT;

ii) SELECT TEACHERNAME, GENDER FROM SCHOOL, ADMIN WHERE


DESIGNATION = ‘COORDINATOR’ AND SCHOOL.CODE=ADMIN.CODE;

iii) SELECT COUNT (DISTINCT SUBJECT) FROM SCHOOL;

(h Write SQL queries for (i) to (iv), which are based on the table: SCHOOL and
ADMIN given in the question 4(g):
i) To decrease period by 10% of the teachers of English subject.

ii) To display TEACHERNAME, CODE and DESIGNATION from tables


SCHOOL and ADMIN whose gender is male. 4

iii) To Display number of teachers in each subject.

iv) To display details of all teachers who have joined the school after
01/01/1999 in descending order of experience.

Section-D
5. (a) What is plagiarism? 1

(b
What is identity theft? 1

(c) List down some points about societal changes introduced by technology. 2

(d
What are the benefits of e-waste Recycling? 2

(e) Write any four steps that you can take to protect yourself from online
2
phishing.

(f) Enumerate any two disability issues while teaching and using computers 2

*************************************************************************

Page 8 of 8

You might also like