Xii Cs Preboard1 Set B

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Set-B

DELHI PUBLIC SCHOOL, MEERUT


Session: 2020-21
Preboard Examination
Subject: Computer Science (083)
Class:XII
Time: 3 Hours Max. Marks: 70

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]

4. What is None literal in python? [1]


5. Which is the correct way to remove an item from dictionary e.g. Tuesday [1]
WEEKD ={'mon':'Monday', 'tue':'Tuesday','wed':'Wednesday'}
a) del WEEKD(“Tuesday”)
b) del WEEKD[‘tue’]
c) del WEEKD[‘Tue’]
d) Both b and c
6. What is the valid way to append value in dictionary day [1]
Day={'mon':'Monday', 'tue':'Tuesday','wed':'Wednesday'}
(i) Day =[‘thu’].’Thursday’
(ii) Day =[“thu”].”Thursday”
(iii) Day [‘thu’]=’Thursday’
(iv) Day.append( [‘thu’]=’Thursday’)

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]

11 Which language is used to develop web pages? [1]

12 What is the full form of ISP [1]


13 Which clause is used to specify filtering condition for groups [1]

14 Which command is used to alter the definition of already created table? [1]

15 Tuples in table can be deleted using which command? [1]

16 Name of the clause which is to remove duplicate value in query result ? [1]

17 Full form of IMAP. [1]

18 What are intellectual property rights? [1]

19. Give any example of IP address. [1]


20.One disadvantage of Bus topology. [1]

21 One advantage of mesh topology. [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

Customer_ID Customer_Name Balance


1 Seema 98768
2 Rita 7888
3 Pooja 5834
4 Sita 388786

(a) Which Attribute is best suitable for Primary Key


(b) Hoe Many attributes is in CUSTOMER table
(c) Insert The following data : Customer_ID-5,Customer_Name-Manju,Balance-45000
(d) Suresh wanted to remove all data from table CUSTOMER. Write Command
(e) Define Cardinality? Write the Cardinality of table CUSTOMER
23. Neha of class 12 is writing a program that reads the text file(abc.txt) and prints only the number
or digits from the file.

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

(a) Name the input mode in Line 1


(b) Name the function that split the line in Line 2
(c) Name the function which tell is it numeric or not in Line 3
(d) Name the variable that print numeric or digit in Line 4
(e) Name the function to finish the work in file in 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#

27. What is the significance of having function in a program? [2]


OR
Write a function which accept dictionary as a parameter and display its contents.
28. Write full form of PPP and POP. [2]
29. What is cross join? [2]
OR
Write a SQL command which describes the concept of equi join.

30. Give the Full forms of the following [2]


(i) FTP
(ii)SMTP
(iii)SSL
(iv)WLL
31 Write is difference between Switch and Router [2]

32 What is a Composite PRIMARY KEY? [2]

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]

36 Write a function in python, Enqueue(Arr,Data) and Dequeue(Arr) for performing


insertion and deletion operations in a queue. Arr is the list used for
Implementing queue and data contain student details as given : [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

(i) SELECT Manufacture


Manufacturer, MAX(Price), Min(Price), Count(*) FROM
M
Product GROUP BY Y Manufacturer;
(ii) SELECT ClientName
ClientName, Manufacturer
FROM Product,Client
Client
WHERE Client.Prod_ld=Product.P_ld;
(iii) SELECT ProductName
ProductName, Price*4
FROM Product

Section-III

38. “Bias Methodologies” is plannin


planning to expand their network in India, starting with three
cities in India to build infrastructur
infrastructure for research and development of their chemical
chemica
products. The company hass planned to setup their main office in Pondicherry-at
Pondicherr three
different locations and have name
named their office as “BackOffice”, “ResearchLab
Lab” and
“DevelopmentUnit”. The company has one more Research office namely “Corporate “Corporat
Office” in “Mumbai”. A layout of the same is as follows:
Approximate distances betwee
between these offices is as follows:

In continuation of the above, th


the company experts have planned to install the
following number of computerss in each of their offices:

(i) Suggest the kind of networ


network required(out of LAN,MAN,WAN)
For connecting eachh of the following office units:
Research Lab and
d BackOffice
Research Lab and
d Development Unit [2]
(ii) Which device will yo
you suggest for connecting all the computers in each
eac of their
office units? [1]

(iii) Which communicatio


communication medium, you will suggest to be procured d by the company for
connecting their loca
local office units in Pondicherry for very effective
effectiv (High Speed)
communication? [1]

(iv) Suggest a network/topology for connecting the company’s local office


e units located in
Pondicherry. Also, sugges
suggest an effective method/ technology for connecting
connectin the
company’s office unit located in Mumbai. [1]
39
Consider the following table
tables Product and Client and give outputs for
SQL queries(i)to(iii) [5]
TABLE:PRODUCT [3]

ABLE:CLIENT
TABLE

Write SQL queries for (i) to ((v)


v) , which are based on the tables PRODUCT and
CLIENT given above.
(i) To display the details o
of those Clients whose City is Delhi
(ii)To display the details o
of Products whose Price is in the
range of 50 to100(Bot
(Both values included)
(iii)To display the ClientName
ClientName,City from table Client, and ProductName and
Price from table Product
Product, with their Corresponding matching P_ID
(iv) To increase the Pric
Price of all Products by 10%.
(v) To display client name
names who take face wash as product.

40. A binary file “Insurance.dat” has structure (Policy_No, P_Name, Premium_Amount,Age).


Premium_Amount,Age
Write a user defined function.. [5]
(i) Newpolicy() to input data for a record and add a policy details
details.
(ii) Countpolicy()() that accept a number as a parameter and tell how many policy have a
premium above that number
OR

A binary File “TEACHER.DAT”


TEACHER.DAT” has structure (Teacher_ID, T T_Name, T_Salary).
T_Salary Write a
function that read the file and tell details of teacher whose salary is above 40000.

You might also like