XII_CS_WC_SET3 QP
XII_CS_WC_SET3 QP
XII_CS_WC_SET3 QP
COMMON EXAMINATION
CLASS XII
COMPUTER SCIENCE - 083/ 3
BLUE PRINT
1|Page
WEST CHENNAI SAHODAYA CLUSTER
(General Instructions )
Please check this question paper contains 8 printed pages
Please check this question paper contains 37 questions.
Please write down the serial number of the question before attempting it.
Reading time of 15 minutes is given to read the question paper alone. No writing during this time.
All questions are compulsory. However, internal choices have been provided in some questions.
Attempt only one of the choices in such questions
The paper is divided into 5 Sections- A, B, C, D and E.
Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
All programming questions are to be answered using Python Language only.
In case of MCQ, text of the correct answer should also be written.
COMMON EXAMINATION
CLASS XII
COMPUTER SCIENCE - 083/ 3
Roll No. __________ MAX. MARKS: 70
Date: 18-12-2024 DURATION: 3 HRS
SECTION – A ( 21 x 1=21)
1. State True or False:
In Python, a ValueError is raised when a function receives an argument of the right
type but an inappropriate value.
2. Identify the correct output of the following code snippet from the options given.
S="ELEVATE YOURSELF"
S=S.replace('EL','@')
print(S)
a) @EVATE YOURS@F c) @LEVATE YOURS@LF
b) @VATE YOURS@F d) @LEVATE YOURS@F
3. Evaluate the following expression:
4**2+3 and 4**2+5//4 or 3/2+4 > 5*2/2
4. If my_dict, you_dict are dictionaries defined as below,
my_dict = {'apple': 10, 'banana': 20, 'orange': 30}
you_dict = {‘monkeys’:15, ‘donkeys’:15}
Which of following statements will produce error while merging the dictionaries?
a) my_dict+you_dict b) my_dict.update(you_dict)
c) str(my_dict)+str(you_dict) d) my_dict.join(you_dict)
2|Page
5. Read the following python code and write the output.
Str=”World Peace”
print(Str[:6][1:-2])
a) dlro b)orl c)orld d)Wrd P
6. csv.reader() is used to read the file, which returns an____________
7. What will be the output of the following statements?
a = [0, 1, 2, 3]
del a[:]
print(a)
a) None b) [ ] c) [0, 1, 2, 3] d) NameError
8. What is the use of id() function in python?
a) returns the data type of object b) returns the size of the object
c) returns the identity of object d) None of the above
9. Pick one the following statements to correctly complete the function body in the given
code snippet.
def f(number):
# Missing function body
print(f(5))
3|Page
19. A Local telephone line network is an example of_____________ switching technique.
Q20 and Q21 are Assertion(A) and Reason(R) based questions. Mark the correct choice
as:
(A) Both A and R are true and R is the correct explanation for A
(B) Both A and R are true and R is not the correct explanation for A
(C) A is True but R is False
(D) A is False but R is True
20. Assertion (A): print(f1()) is a valid statement even if the function f1() has no return
statement.
Reasoning (R): A function always returns a value even if it has no return statement.
21. Assertion (A): The Delete command of SQL deletes the rows of the table.
Reasoning (R): The command deletes all the rows and also the table structure from the
memory.
SECTION– B (7 x 2 = 14)
23. i) Write a Python statement to display alternate characters of a string, named my_exam.
For example, if my_exam="Russia Ukraine" The statement should display Rsi kan
ii) if L1= [19,23,17,13,71] and L2=[21,5,11,31,55]
a) merge L1 with L2 so that they merge to become a single list in the name L1.
OR
b) Arrange the elements of L1 and L2 in ascending order.
24. Identify the possible outputs of the following program from the given below options: Also
write the minimum and maximum value generated.
import random
color = [‘Black’,’White’,’Yellow’,’Blue’]
for i in range(random.randint(0,2)):
print(color[i], end="*")
print()
a) Black*White* b) Black* c) Black*White*Yellow* d) No output
4|Page
ii) Ravi a python programmer is working on a project, for some requirement, he has to
define a function with name CalculateInterest(), he defined it as:
def CalculateInterest(Principal, Rate=.06,Time):
# code
But this code is not working, can you help Ravi to identify the error in the above function
and what is the solution?
26. A CD/DVD Shop named “NEW DIGITAL SHOP” stores various CDs & DVDs of
songs/albums/movies and use SQL to maintain its records using SQL table.
i) a) Write the Degree & Cardinality of the relation LIBRARY. Also Identify the best
attribute which may be declared as Primary key.
OR
b) What constraint can be applied to Name so that no NULL values are permitted.
ii) a) Insert the following record in the above relation: (10009, ”Motivational Songs”, 15, 70)
OR
b) Write an SQL query to display the minimum quantity.
27. What is the difference between ‘Primary Key’ and ‘Foreign Key’? Can a table have
multiple Primary keys or Foreign keys?
28. a) Differentiate XML and HTML.
OR
b) i) What is the use of TELNET?
ii) What is DTR? Write the units of DTR.
SECTION – C (3 x 3 = 9)
29. A) Write a Python function DISPLAY() that displays the longest palindromic word from a
text file “Article.txt”.
For Example if the file contains;
“Malayalam is one of the Indian language.
Arjun is driving a racecar.
Have some civic sense.
The highest level of cognitive domain is evaluation.”
Then the output should be Malayalam.
OR
B) A file “Phone.txt” is a text file contains Zone Name and Phone Number in the
following format.
NORTH 7577843767
SOUTH 9865576321
EAST 7865432564
WEST 7435248988
Write a function DISPLAY() in python to open the file in an appropriate mode to retrieve
zone names and phone number. Display the zone name with the phone numbers whose
phone number starts with the number ‘7’. Assume that the file already exists in the
System.
5|Page
30. A) Predict the output of the following program:
def change(s):
d = {"UPPER" : 0, "LOWER" : 0 }
for c in s:
if c.isupper():
d["UPPER"] += 1
elif c.islower():
d["LOWER"] += 1
else:
pass
print("Upper case count :", d["UPPER"])
print("Lower case count :", d["LOWER"])
change("School Days are Happy")
OR
B) Predict the output of the following program:
def frequency(str):
d={}
for n in str:
keys=d.keys()
if n in keys:
d[n]+=1
else:
d[n]=1
return d
print(frequency("Excel"))
31. A) A list contains the following record of a Hostel: [Hostel_No, Total_Students, TotalRooms].
Write the following user defined functions to perform given operations on the stack named
‘Hostel’:
(i) Push_element() - To push an object containing Hostel_No and Total Students along with
Total Rooms to the stack
(ii) Pop_element() - To pop the objects from the stack and display them. Also, display
“Stack Empty” when there are no elements in the stack.
For example:
If the lists of Hostel details are:
[ [1,2000,1000], [2, 1500,800], [3,5000,2000] ]
The output should be:
[3,5000,2000]
[2, 1500,800]
[1,2000,1000]
Stack Empty
OR
B) Pranay has created a dictionary containing 5 different car names and their prices as key –
value pairs. Write separate user defined functions to perform the following operations:
Push the keys (car names) of the dictionary into a stack, where the corresponding value
(price) is greater than or equal to 900000.
Pop and display the content of the stack ad make the stack to be empty at the end.
For example:
If the sample content of the dictionary is as follows:
MyDict={“Maruthi”:750000, ”Hyundai”:850000,”Kia”: 900000,
”Honda”:1050000,”Ford”:1080000}
6|Page
The output of the program should be : Ford 1080000
Honda 1050000
Kia 900000
33. Write a function def Television() in Python to read all the records from the file
“Inventroy.csv” which stores the records of various products such as Television,
Refrigerator, Air-Conditioner etc., under different fields as mentioned below:
Code Item Company Price Quantity
T/01 Television LG 42000 15
T/02 Television Sony 45000 20
F/01 Refrigerator LG 55000 25
…….. ………… ……. ……… ……
…….. ………… ……. ……… ……..
Now, Display the details of all televisions of various companies from the file, also display
the total cost of all televisions. [ Assume that the file is already present in the hard disk]
34. Write the SQL commands for the questions (i) to (iv) based on the relations
MOBILEMASTER & MOBILESTOCK given below:
Table: MOBILEMASTER
7|Page
Table: MOBILESTOCK
i) Display the total Quantity of mobiles and mobile name available for every mobile.
ii) Display the name of the Suppliers supplying the mobile of the company “Nokia”
iii) Decrease the price of the mobile by 2000 whose manufacturer date is between 2011 and
2013.
iv)A) Display the total cost of the “Micromax” company mobiles.(total cost is price *quantity)
OR
B) Add a new column called discount of type integer to the MOBILEMASTER.
35. Kathir wants to write a program in Python to do the following in the table named
Student in MYSQL database SCHOOL:
rno(Roll number ) integer
name(Name) string
DOB (Date of birth) Date
Fee float
Note the following to establish connectivity between Python and MySQL:
Username - root
Password - tiger
Host - localhost
i) The values of fields rno, name, DOB and Fee has to be accepted from the user and
appended to the table Student.
ii) To increase the Fee of the all the students by 10%
Help Kathir to complete the program in Python.
SECTION – E ( 2 x 5 =10)
36. Vino had written a python program that stores the content of a stock table permanently
in the hard disk. For that he had chosen the concept of binary files to store the data in a
binary file “STOCK.DAT”. But his code is not working properly, help him to rewrite
the complete code using user defined functions for the following:
i) Write a function to create a binary file STOCK.DAT and store the following content:
Itemno Itemname Dealercode Quantiy Unitprice
5005 Ball Pen 0.5 102 100 16
5003 Ball Pen 0.25 102 150 20
5002 Gel Pen Premium 101 125 14
5006 Gel Pen Classic 101 200 22
5001 Eraser Small 102 210 5
5004 Eraser Big 102 60 10
ii) Write a function to read the binary file display the total price of all the items where
total price is calculated as Unitprice*Quantity.
iii) Write a function to Update the Unitprice by 10 for the items whose name starts with
“Gel”.
8|Page
37. National Centre for Indigenous Arts has just made arrangement for a new Campus in
Raipur to set up a network and also to connect with the London campus.
The distances between various buildings of Raipur campus are given as:-
Main to Admin 50 mtr
Main to Finance 100 mtr
Main to Academic 70 mtr
Admin to Finance 50 mtr
Finance to Academic 70 mtr
Admin to Academic 60 mtr
Number of computers in each building:-
Main Building 150
Admin Building 75
Finance Building 50
Academic Building 60
As a network expert, you are required to give best possible solutions for the given queries of
the center administration:-
a) Suggest and draw a cable layout to efficiently connect various buildings/blocks.
b) Suggest the most suitable building to house the server of this university with a
suitable reason.
c) Suggest the placement of following devices with justification:
1. Switch/Hub 2. Repeater
d) Suggest the transmission medium out of the following for setting-up very fast Internet
connectivity among buildings of the university
1. Optical Fiber 2. Coaxial cable 3. Ethernet Cable
e) i) Suggest a protocol that shall be needed to provide Video Conferencing solution between
Raipur Campus and London Campus.
OR
ii) What type of network will be set up among the computers connected in the Raipur
campus
***************END OF PAPER***************
9|Page