Sei sulla pagina 1di 6

SET- H

KENDRIYA VIDYALAYA SANGATHAN, AGRA REGION


COMPUTER SCIENCE – NEW (083)
Pre Board Exam(2019-20) CLASS- XII
Max. Marks: 70 Time: 3 hrs
General Instructions:
● All questions are compulsory.

● 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
Q1. (a.) Find the output of following : 1
(i) 12&10 (ii) 7^13
(b.) What does ord() and chr() built-in function in python ? write one 1
example for each.
(c.) Write the type of token from the following – 1
(i) elif (ii) Str1
(d.) Rewrite the following code in python after removing all syntax error(s). 2
Underline each correction done in the code.
1=i
J=1
While I<=5
While j <=2 :
Prent(I*J end=” ‘)
J+1=J
Print()
I=I+1

Page 1 of 6 083/8
(e.) Find and write the output of the following python code : 3
def run(s):
k=len(s)
m=” “
for i in range(0, k):
if (s[i].islower()) :
m = m + s[i].upper()
elif (s[i].isalpha()):
m = m + s[i].lower()
else:
m = m + ‘aa’
print(m)
run(‘sCHOOL2@COM’)
(f.) Find and write the output of the following python code: 3
def sfun(str):
count=3
while True:
if str[0]==’a’:
str = str[2 : ]
elif str[-1]==’b’:
str=str[ : 2]
else :
count+=1
break
print(str)
print(count)
sfun(“aabbcc”)
sfun(“aaccbb”)
sfun(“abcc”)
(g.) Consider the following code : 2
import random
print(int(20+random.random()*5), end=’ ’)
print(int(20+random.random()*5), end=’ ’)

Page 2 of 6 083/8
print(int(20+random.random()*5), end=’ ’)
print(int(20+random.random()*5))
choose the correct option/options from four given below. Also find least
value and highest value that can be generated.
(i) 20 22 24 25 (ii) 22 23 24 25
(iii.) 23 24 23 24 (iv) 21 21 21 21
Q2. (a.) Rewrite the following code in python after removing all syntax error(s). 2
Underline each correction done in the code.
Define check()
n=input(“enter value of n(integer)”)
N=n*2
Print(“n is :”+n)
Else :
N=n/2
Print(“n is :” n)
(b.) Define a function name countto that reads a existing file named 2
“tofile.txt” and count numbers of all “to” or “TO”.
(c.) Explain write() and writelines() functions in File handling of Python 2
with examples.
(d.) Write a program that reads a string and checks whether it is a palindrome 2
string or not.
Note: NAVAN is palindrome, because its reverse is also NAVAN.
PAWAN is not a palindrome, because its reverse is NAWAP.
(e.) Write a Recursive function factorial(n) in python to calculate and return 4
the factorial of number n passed to the parameter.
(f.) Predict the output of following code : 2
def code(n) :
if n==0:
print(“stop”)
else:
print(n)
code(n-3)
code(15)

Page 3 of 6 083/8
(g.) Calculate the run-time efficiency of the following program segment : 2
i=1
while i<=n :
j=1
while j<=n:
k=1
while k<=n :
print(I,j,k)
k=k+1
j=j+1
i=i+1
OR
Draw a multiple bar chart to compare sales of two salespersons for first
six months. Take months along x-axis and sales along y-axis. Also display
title of chart, labels, legends, xticks .
(h.) Evaluate the following postfix expression using stack and show the 2
contents of execution of each operation :
True,True,or,False,True,not,or,and
(i.) Write a function in python, MakePush(elem) to add a new element in a 2
List of elements, considering
it to act as push operation of the Stack data structure
SECTION-B
Q3. Questions 3 (a) to 3 (c) : Fill in the blanks
(a.) ------------refers to the process of obtaining corresponding IP address 1
from a domain name.
(b.) ------------command determines whether remote machine can receive test 1
packet and reply.
(c.) ------------ is a network application that permits a user sitting at a 1
different location to work on a specific program on other computer.
(d.) ------------ is a system of rules that allow two or more entities of a 1
communications system to transmit information via any kind of variation
of a physical quantity.
(e.) Give the full forms of the following : 2
(i) IMAP (ii) SSL
(iii.) https (iv) POP
(f.) Discuss how IPv4 is different from IPv6. 2
(g.) Write the definition of following in one line : 3
(i) Frequency modulation (ii) checksum
(iii.) URL

Page 4 of 6 083/8
(h.) A Stock Exchange Company has set up its new centre in Kolkata for its 4
office. It has 4 blocks of buildings named Block A, Block B, Block C,
Block D.

Number of Computers
Block A 25
Block B 50
Block C 120
Block D 30

Shortest distances between various Blocks in meters:


Block A to Block B 60 m
Block B to Block C 40 m
Block C to Block A 30 m
Block D to Block C 50 m

(i) Suggest the most suitable place (i.e. block) to house the server of this
company with a suitable reason.
(ii) Suggest the type of network to connect all the blocks with suitable
reason.
(iii)The company is planning to link all the blocks through a secure and
high speed wired medium. Suggest a way to connect all the blocks. (iv)
Suggest the most suitable wired medium for efficiently connecting each
computer installed in every block out of the following network cables:
● Coaxial Cable ● Ethernet Cable
● Single Pair Telephone Cable
Section : C
Q4. (a.) Give name of any two famous web frameworks. 1
(b.) What is the purpose of setting.py file in Django ? 1
(c.) What will be the generated query string? 1
Query= “INSERT INTO books(title,ISBN)
VALUES(%s,%s).%(‘networking’,’234561’)”
(d.) What is database cursor? 1
(e.) Write any four aggregate functions with syntax. 2
(f.) Differentiate between Django GET and POST method. 2
(g.) Write a output for SQL queries (i) to (iii), which are based on the table:
GARMENT given below :
3
Table : GARMENT
GCODE GNAME SIZE COLOUR PRICE
111 Tshirt XL Red 1400
112 Jeans L Blue 1600
113 Skirt M Black 1100
114 Jacket XL Blue 4000
115 Trousers L Brown 1500
116 top L pink 1200

Page 5 of 6 083/8
(i)
SELECT COUNT(*), SIZE FROM GARMENT GROUP BY
SIZE HAVING COUNT(*)>1;
(ii) SELECT MAX(PRICE),MIN(PRICE) FROM GARMENT;
(iii) SELECT GNAME,SIZE,PRICE FROM GARMENT
WHERE COLOUR =”Blue”;
(h.) Write SQL queries for (i) to (iv), which are based on the table: 4
GARMENT given in the question 4(g):
(i) To display the records from table GARMENT in alphabetical
order as per GNAME
(ii) To display GCODE, GNAME and SIZE where PRICE is
between 1000 and 1500.
(iii) To display names of those garments that are available in
‘XL’ Size.
(iv) To change the colour of garment with code as 116 to
“orange”

SECTION :D
Q5. (a.) What is plagiarism ? 1
(b.) What is computer forensics ? 1
(c.) Why should intellectual property rights be protected ? 2
(d.) Explains disability issues which obstruct teaching and using compters. 2
(e.) How to protect against identity theft ? 2
(f.) Writes the benefits of e-waste recycling ? 2

Page 6 of 6 083/8

Potrebbero piacerti anche