Xii Cs Preboard1 Set B
Xii Cs Preboard1 Set B
Xii Cs Preboard1 Set B
General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section – I is short answer questions, to be answered in one word or one line.
b. Section – II has two case studies questions. Each case study has 4 case-based
sub- parts. An examinee is to attempt any 4 out of the 5 subparts.
4. Part - B is Descriptive Paper.
5. Part- B has three sections.
a. Section-I is short answer questions of 2 marks each in which two questions
have internal options.
b. Section-II is long answer questions of 3 marks each in which two questions have
internal options.
c. Section-III is very long answer questions of 5 marks each in which one question
has internal option.
6. All programming questions are to be answered using Python Language only
Part-A
Section-I
Select the most appropriate option out of the options given for each question. Attempt any
15 questions from question no 1 to 21.
1. Which of the following is valid arithmetic assignment operator in Python?
(i) % (ii) ^ (iii) != (iv) += [1]
2. Write the type of tokens from the following?
(i) 10 (ii) , [1]
3. Name the Python Library modules which need to be imported to invoke the
following functions?
(i) pi (ii) randrange() [1]
7. Find and write the output of the following python code: [1]
x="abcdefghijkl"
for i in range(1,len(x)):
i=5
print(i+1,end=" ")
i=i-1
8. Find and write the output of the following python code: [1]
n=1
def f2():
global n
n=100
return n
print(n)
n=n+1
print(f2())
print(n)
9. Name the device that work like a bridge but can handle different protocol [1]
10. Name the device used to segment networks into different sub network
called subnet. [1]
14 Which command is used to alter the definition of already created table? [1]
16 Name of the clause which is to remove duplicate value in query result ? [1]
Section-II
Both the Case study based questions are compulsory. Attempt any 4 sub parts from each
question. Each question carries 1 mark
22. A Bank Name ICICBANK to maintain their Customer Details. As a programmer Suresh had
decided that
• Name of the database -myBank
• Name of the table –CUSTOMER
• The attributes of CUSTOMER are as follows:
Customer_ID - numeric
Customer_Name – character of size 40
Balance – numeric
Table: CUSTOMER
fin=open(“abc.txt”,”_______”) #Line1
for line in fin:
words=line.__________() #Line2
for i in words:
for letter in i:
if (letter._____): #Line3
print(______) #Line 4
fin.____ # Line5
Part – B
Section-I
24. Rewrite the following code in python after removing all syntax error(s).
Underline each correction done in the code? [2]
a=int(input(“Enter a integer”))
if a=1 :
print “rainy season”
elif a==2:
print “summer season”
else:
print “winter season”
25 Find and write the output of the following python code? [2]
def f1(s):
k=len(s)
for i in range(k):
if i==3:
b=int(i)
b+=b-3
s[i]=b
elif (s[i].islower()):
s[i]=s[i].upper()
else:
s[i]=s[i]*2
print(s)
str1=list("TpM5")
f1(str1)
26. What possible outputs(s) are expected to be displayed on screen at the time of
execution of the program from the following code? Also specify the maximum and
minimum value of x and y can be assigned. [2]
import random
lan=['c','o','m','p','u','t','e','r'];
x=random.randint(1,3)
y=random.randint(2,4)
for k in range(x,y+1):
print(lan[k],end="#")
(i)m#u#p# (ii)m#p#u#
(iii)u#t#e# (iv)u#p#m#
33 Identify the type of cyber crime for the following situations [2]
(i) A persons user name and password of his/her email account was acquired
over the internet.
(ii) A person download a new movie which is not available for free download.
Section- II
34. Write a method or function COUNTWORD() in python that reads the text file [3]
ESSAY.TXT and count the number of words which contain greater than five characters.
OR
Write a function remove COPYUPPERCASELINE() that accept two filename , and copies
all line that start with uppercase letter from the first file into the second file.
35 Write a python program to find the sum of element in the given list. [3]
Roll no Integer
Student Name String
OR
Write a function in python by using data structure of stack SPUSH(Arr,SDATA) and
DISPLAY(Arr) for performing addition and disp
display containing information of the Salesman
on the top. Details of saleman stack are given below:
Salesman No Integer
Salesman Name String
37
Consider the following table
tables Product and Client give outputs for SQL
queries(i) to (iii) . [3]
TABLE:PRODUCT [3]
TABLE
ABLE:CLIENT
Section-III
ABLE:CLIENT
TABLE