Sunteți pe pagina 1din 4

SAMPLE PAPER SET-II

PRE-BOARD EXAMINATION 2019-20


CLASS - XII
C.S with Python
Time Allowed: 3Hrs. SET-A Maximum Marks: 70

1.
a) Which of the following is valid arithmetic operator in Python: (1)
(i) % (ii) // (iii) < (iv) NOT
b) Write the type of tokens from the following: (1)
(i) if…elif (ii) Std_no
c) Name the Python Library modules which need to be imported to invoke the following functions:
(1)
(i) sqrt( ) (ii) pow ( )
d) Rewrite the following code in python after removing all syntax error(s). Underline each correction
done in the code. (2)
50=To
for K in range(0,To)
IF k%5==0:
print (K*5)
Else:
print (K+4)
e) Find and write the output of the following python code: (2)
def fun(r):
k=len(r)
m=" "
for i in range(0,k):
if(r[i].isupper()):
m=m+s[i].lower()
elif r[i].isalpha():
m=m+r[i].upper()
else:
m=m+'bb'
print(m)
fun('brjdpublicschool2@com')

f) Find and write the output of the following python code: (3)
def Change(P ,Q=50):
P=P+Q
Q=P-Q
print( P,"#",Q)
return (P)
R=150
S=100
R=Change(R,S)
print(R,"#",S)
S=Change(S)
g) Find and write the output of the following python code: (2)
X=10
Y=5
for I in range(x-y*2):
print (“%”, I )
2.
a) What do you understand by the term loop? (1)
b) Which is the correct form of declaration of dictionary? (1)
(i) Day={1:’a’,2:’b’,3:’c’}
(ii) Day=(1;’a’,2;’b’,3;’c’)
(iii) Day=[1:’a’,2:’b’,3:’c’]
(iv) Day={1’a’,2’b’,3’c’
c) Identify the valid declaration of A = (11, 233, ‘hru’, 9). (1)
(i) list (ii) dictionary (iii) array (iv) tuple
d) Find and write the output of the following python code: (1)
count=0
while count<10:
print (‘Hello’)
count+=1

e) Find and write the output of the following python code: (1)
num=1
def mufunc( ):
rReturn num
print (num)
print(myfunc())
print(num)
f) What is the significance of having functions in a program? (2)
g) Write code to create a pie chart for sequence con = [25,17, 25, 34,40] for Zones = [‘East’,
‘West’,’North’, ‘South’, ‘Central’] (2)
OR
Draw the chart for the following code:
Plt.plot(x,y, ‘r-‘)
Plt.xlabel(‘x’)
Plt.ylabel(‘y’)
Plt.title(‘My Chart’)
h) Write a program to read n bytes(30 bytes) and then read some more bytes from the last position.
( say 50 bytes) (2)
OR
Write code to read a complete file – line by line.(poem.txt)
i) Write a program to calculate simple interest using a function interest that can receive principal
amount, time and rate and returns calculated simple interest. (2)
j) What is the output of the following code? (2)
def addEm(x,y,z):
print(x+y+z)
def prod(x,y,z):
return(x*y*z
a=addEm(6,16,26)
b=prod(2,3,6)
print(a,b)
k) Write a program to show the use of recursion in calculation of power e.g.,ab. (3)
SECTION : B
3.
a) What is cloud computing? (1)
b) What is NIC? (1)
c) What is the purpose of using router? (1)
d) What is the role of switch? (1)
e) Give the full forms of the following: (2)
(i) NNTP
(ii) MIME
(iii) URL
(iv) TCP
f) What is modulation? (2)
g) What technical ways are used to ensure the secure data transmission. (3)
h) Software Development Company has set up its new center at Raipur for its office and web based
activities. It has 4 blocks of buildings named Block A, Block B, Block C, Block D. (4)
Number of Computers

Block A 50
Block B 75
Block C 1500
Block D 1000

Shortest distances between various Blocks in meters:


Block A to Block B 80
Block B to Block C 50
Block C to Block A 40
Block D to Block C 60

(i) Suggest the most suitable place (i.e. blo


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 secure and high
high-speed wired medium.
Suggest a way to connect all the blocks.

(iv) Suggest the most suitable wired m


medium
edium for efficiently connecting each computer installed in
every block out of the following network cab
cables: ● Coaxial Cable
able ● Ethernet Cable
● Single Pair Telephone Cable.
SECTION : C
4.
a) Which key word is used to ssort the records of a table in ascending order? (1)
b) Which command is used to show all the databases? (1)
c) Which command is used to update the records of the table? (1)
d) Which clause is used to remove the duplicating rows of the table? (1)
e) Differentiate between Primary key and Foreign key. (2)
OR
Differentiate between Tuple and Attribute.
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: Employ given below: (3)

Table : Employ

(i) SELECT DISTINCT(CITY) FROM EMPLOY


EMPLOY;
(ii) (ii) SELECT MAX(MARKS
MAX(MARKS),MIN(MARKS) FROM EMPLOY;;
(iii) SELECT NAME,GENDER FROM EMPLOY WHERE CITY=”DUBAI”;
(h) Write SQL queries for (i) to (iv), which are based on the table: EMPLOY given in the question 4(g): (4)
(i) To display the records from table student in increasing order as per the marks of the EMPLOY.
(ii) To display all records in the table.
(iii) To display Name, Class and total number of employees who have secured marks between 400 and
500
(iv) To add one more column(average).

SECTION : D

5.
a) What is online fraud? (1)
b) What are intellectual property rights? (1)
c) What are common gender and disability issues faced while teaching computers in classrooms? (2)
d) Give examples of software, hardware that may be used for special needs students. (2)
e) Differentiate between freeware and shareware. (2)
f) What do you understand by plagiarism? (2)

S-ar putea să vă placă și