Computer Science CLS 12

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

WEST CHENNAI SAHODAYA CLUSTER COMMON EXAMINATION 2020

Class XII – Computer Science (083)


Date & Duration : 23-12-2020 / 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
subparts.
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 question 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
------------------------------

. 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. Find odd one out. [1]
(a) String (b) Dictionary (c) Tuple (d) List
2. Write the type of tokens from the following: [1]
(i) if (ii) roll_no
3. A file is opened using following modes that does not exist. In which case it will [1]
result in error?
(a) r (b) a (c) w (d) r+
4. What will be the output of the following code? [1]

S = “Do not wait for tomorrow”


print(len(S[3:10]))
5. Which of the operation(s) can be used with Tuple defined as follows? [1]
t1 = (1,2,3)
t2 = (8,9,10)

(a) + (b) - (c) * (d) //

6. What will be the output of the following code? [1]

(a) None (b) ValueError (c) KeyError (d) 0

7. Write Python statement to create a tuple having lowercase vowels. [1]

8. Name the Python Library modules which need to be imported to invoke the
following functions:
(i) sin() (ii) randint ()

9. LTE standard is associated with which generation of telecommunication [1]


technology?

(a) 2G (b) 3G (c) 4G (d) 5G

10. _______ looks like a legitimate software and once it tricks a user into installing [1]
it, it acts pretty much like a virus or worm.

11. The SQL keyword ________ is used with wildcards % and _. [1]

12. The SQL keyword BETWEEN is used: [1]


(a) Give inclusive range (b) Give exclusive range
(c) Limit number of columns displayed (d) Give inclusive or exclusive range

13. Which of the following functions ignore the NULL values? [1]
(a) sum (b) max (c) avg (d) All of the above

14. In SQL, which query will display the list of databases on a system? [1]

15. Name transmission that is suitable for a LAN [1]

16. Which of the following expression(s) would result in integer only, if both a and b [1]
are integers?
(a) a % b (b) a // b (c) a / b (d) a / -b

17. What will be the output of the following code? [1]

str1 = “ABCD”
s = “@”
print(s.join(str1))

18. What will the degree and cardinality of the following table? [1]

19. Write expanded form of [1]


(a) SMTP (b) POP

20. Which of the following constraint(s) will not allow a NULL value in a column? [1]
(a) Primary Key (b) Unique (c) Not Null (d) Null

21. Rearrange the following terms in increasing order of area covered. [1]

LAN, WAN, PAN, MAN

Section-II
Both the Case study based questions are compulsory. Attempt 5 sub
parts from each question. Each question carries 1 mark
22 Wizard‟s School is considering to maintain their inventory using SQL to store
the data. As a database administer, Vijay has decided that:
 Name of the database - School
 Name of the table - Student
(i) Write a command to insert Suman‟s record with the data as shown in the [1]
table.

(ii) What will be the most suitable datatype for the grade column and why? [1]

(iii) Which constraint can be used to restrict the maximum marks to 100? [1]

(iv) What will be the output of the following query? [1]


SELECT COUNT(grade) FROM Student;

(v) Write command to add one more column class to store class in roman [1]
numeral form. Choose appropriate datatype.

23 3-IITians Startup is maintaing a database of all its venture capitalists.


The Data Captured is Venture Code, Name, Invest_Amt in a file "Venture.csv".
They need to print the names of Venture Capitalists who are investing
more than 5,00,000,000 or as requested by the user.Complete the following
code to perform the above task.

import csv
def VentureCreate(FileName,Rec):
File = open(--------------) #Line1
FN = ['VentureCode', 'Name', 'InvestAmt']
WriterObj = csv.writer(File)
_______________________________ # Line2
for i in range(Rec):
DataRow = input("Enter Data ...").split()
DataRow[2] = int(DataRow[2])
_____________________________ # Line2
File.close()

def VentureRead(FileName, Amount):


File = open(FileName, 'r')
DataRow = csv.reader(File)
for Row in DataRow:
if(_______________________): #Line3
print(Row[1])
File.close()

FN = input("Enter File Name ...")


R = int(input("Enter records required ..."))
VentureCreate(FN,R)
Minimum = int(input("Enter minimum investment amount ..."))
________________________ #Line4

Data Entered …
FN = “Venture.csv”
R=3
Data …
V101 Blume_Ventures 50000000
V102 Helion_Venture_Partners 45000000
V103 Inventus_Capitalist 300000
Minimum = 500000

i) Complete Line1 to add data to the file [1]


ii). Complete Line2 to store data to file [1]
iii) Complete Line3 in order to display Capitalist names [1]
iv) Complete Line4 to invoke the segment that extracts the data from file to perform [1]
the task
v) What would be the contents displayed when Line4 is Executed? [1]

Part – B
Section-I
24 What will be the output of the following Python code [2]

for a in range(-1,7,4):
for b in range(2):
print(a,b)
25 What is the difference in functioning of switch and hub? [2]
OR
Explain the concept of IPR. Name any one category of product that is covered
under IPR.
26 Given below is a URL. [2]

https://drive.google.com/drive/u/1/search?q=sql

Explain the following parts of it.

(a) https (b) drive


27 What is meant by keyword parameters? Explain with example. [2]
OR
What do you understand by term „Scope of a variable‟? Explain with example.
28 Rewrite the following code in Python after removing all syntax error(s). [2]
Underline each correction done in the code.
def fun(s)
k=len[s]
m=" "
for i in range(0,k):
if(s[i].isupper()):
m=m+s[i].lower
elif s[i].isalpha():
m=m+s[i].upper()
else:
m=m+'bb'
print m
fun('school2@com')
29 Observe the following Python code and find out , which out of the given options [2]
(i) to (iv) are the expected correct output(s). Also assign the maximum and
minimum value that can be assigned to the variable „Go‟.
import random
X =[100,75,10,125]
Go = random.randint(0,3)
for i in range(Go):
print (X[i],"$$",end=‟‟)
i. 100$$75$$10 ii. 75$$10$$125$$ iii. 75$$10$$ iv.10$$125$$100

30 Anil has doubt about Primary Key constraint and Unique constraint. Can you [2]
help him understand what way they are similar and in what way they are
different?

31 Explain any four parameters of connect ( ) function used to integrate MySQL [2]
database with Python.

32 Explain any two advantages of using RDBMS. [2]

33 Find the output of the following program [2]


def calcresult () :
i=9
while i> 1 :
if (i % 2 == 0):
x = i%2
i = i-1
else :
i = i-2
x=i
print( x**2)
calcresult ( )
Section- II

34 Write a Python method/function SwitchOver(Val) to swap the even and odd [3]
positions of the values in the list Val.
Note : Assuming that the list has even number of values in it.
For example :
If the list Numbers contain
[25,17,19,13,12,15]
After swapping the list content should be displayed as
[17,25,13,19,15,12]

35 Write a method/function BIGWORDS() in Python to read contents from a text file [3]
CODE.TXT to count and display the occurrence of those words, which are
having 5 or more alphabets.
For example :
If the content of the file is
ME AND MY FRIENDS ENSURE SAFETY AND SECURITY OF EVERYONE
The output will be 5
OR
Write a method in Python to read lines from a text MYNOTES.TXT, and display
those lines, which are starting with the alphabet.

36 Consider the following tables: [3]


APPLICANTS
NO NAME FEE GENDER C_ID DATEOFJOIN
1012 AMANDEEP 30000 M A01 2012-01-02
1102 AVISHA 25000 F A02 2009-03-24
1103 EKANT 30000 M A02 2011-11-04
1049 ARUN 40000 M A02 2009-05-06
1025 AMBER 30000 M A02 2011-11-03
1106 ELA 40000 F A05 2010-11-12
1017 NIKITA 35000 F A03 2012-12-04
1108 ARLEENA 30000 F A03 2012-10-01
1101 SHAKTHI 25000 M A04 2011-03-23
(i) Select min (dateofjoin) from applicants where gender=‟m‟;
(ii) Select avg (fee) from applicants where c_id=‟a01‟ or c_id=‟a05‟;
(iii) Select sum (fee), c_id from applicants group by c_id having count (*) =2;

37 Write Insert(Place) and Delete(Place) methods in python to add Place and [3]
Remove Place considering them to act as Insert and Delete operations on a List
storing names of cities. Also print the details after every operation in the
ascending order
OR

Write DoPush(Customer) and DoPop(Customer) methods/function in Python to


add a new Customer and delete a Customer from a List of Customer names,
considering them to act as push and pop operations of the Stack data structure.

Section-III

38 Software Development Company has set up its new center at Raipur for its [4]
office and web based activities. It has 4 blocks of buildings named Block A,
Block B, Block C, Block D.
Block Number of
Computers
A 25
B 50
C 125
D 10

Shortest distances between various Blocks in meters:


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

(i) Suggest most suitable place to house server of this company with proper
reason.
(ii) Suggest the layout of connection between the blocks and identify the
topology of the layout.
(iii) Suggest the placement of the Modem in the network with justification.
(iv) Suggest the most suitable transmission media to use to connect this center
with Head office located at Delhi economically.
(v) What type of network would be formed when Delhi Centre is connected?

39 Consider the following tables DRESS and MATERIAL. Write SQL commands for [4]
the statements (i) to (iv)

Table: MATERIAL

MCODE TYPE
M001 TERELENE
M002 COTTON
M004 POLYESTER
M003 SILK

Table: DRESS

DCODE DESCRIPTION PRICE MCODE LAUNCHDATE


10001 FORMAL SHIRT 1250 M001 12–JAN–08
10020 FROCK 750 M004 09–SEP–07
10012 INFORMAL SHIRT 1450 M002 06–JUN–08
10019 EVENING GOWN 850 M003 06–JUN–08
10090 TULIP SKIRT 850 M002 31–MAR–07
10023 PENCIL SKIRT 1250 M003 19–DEC–08
10089 SLACKS 850 M003 20–OCT–08
10007 FORMAL PANT 1450 M001 09–MAR–08
10009 INFORMAL PANT 1400 M002 20–OCT–08
10024 BABY TOP 650 M003 07–APR–08

(i) To display DCODE and DESCRIPTION of a each dress in ascending order of


DCODE.
(ii) To display the details of all the dresses which have LAUNCHDATE in between
05–DEC–07 and 20–JUN–08 (inclusive of both the dates).
(iii) To display the average PRICE of all the dresses which are made of silk.
(iv)To display material wise highest and lowest price of dresses from DRESS
table. (Display MCODE of each dress along with highest and lowest price)
40 A binary file “teacher.dat” has structure [empcode,trname,designation,subject]. [4]
i. Write a user defined function CreateFile()to input data for a record and
add to the file
ii. Write a function Countdesig( ) in Python which counts and displays the
number of distinct designations in the file.

OR

Write a program to enter the following records in a binary file:


[Item No, Item_Name, Qty, Price]
Number of records to be entered should be accepted from the user. Read the
file to display the total value of stock. Value of each item to be calculated as
Price * Qty

You might also like