0% found this document useful (0 votes)
40 views4 pages

Set 3 (Ans)

Answer

Uploaded by

naruto12341270
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views4 pages

Set 3 (Ans)

Answer

Uploaded by

naruto12341270
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

WEST CHENNAI SAHODAYA CLUSTER

COMMON EXAMINATION
CLASS XII
COMPUTER SCIENCE 083/3
MARKING SCHEME
MAX. MARKS: 70 DURATION: 3 HRS.

SECTION – A ( 21 x 1=21)
1. True
2. a) @EVATE YOURS@F
3. 17
4. a) my_dict+you_dict , d) my_dict.join(you_dict)
5. b)orl
6. iterator
7. b) [ ]
8 c) returns the identity of object
9. d) return number
10. F.readline(50)
11. b) DROP DATABASE
12. d) Cartesian Product
13. sector
14. False
15. d) When 1 == "1" is executed, exception is raised
16. d) HTTPS
17 a) add a column
18. d) Co-axial
19. Circuit.
20. (A) Both A and R are true and R is the correct explanation for A
21. (C) A is True but R is False
SECTION– B (7 x 2 = 14)
22. i) Same Equal
$
$
$
$
ii) a) print(S.count(‘c’)
OR
b) print(S.find(‘c’))
23. i) print(my_exam[::2])
ii) a) L1.extend(L2)
OR
b) sorted(L1+L2)

24. a) Black*White* b) Black* d) No output


Maximum value=2, minimum value =0
25. i) The global keyword allows a function to access and modify a global variable directly, rather
than creating or working with a local copy.
ii) Ravi's code is incorrect because in Python, default arguments must come after all non-default
arguments. The parameter Time is a non-default argument but comes after Rate, which is a
default argument. This violates Python's rules for function arguments.
To fix the issue, all non-default arguments should appear before default arguments. Here's the
corrected code:
def CalculateInterest(Principal, Time, Rate=0.06):
# code
26. i) a) Degree-4, Cardinality-6, Primary key- CDNO
OR
b) NOT NULL
ii) a) insert into LIBRARY values (10009, ”Motivational Songs”, 15, 70);
OR
b)select min(QTY) from LIBRARY;

27. Primary key is used to uniquely identify each record in the table. Foreign key is used to establish
and enforce a link between two tables (referential integrity). A table can only have one primary
key (but it can be composite, consisting of multiple columns). A table can have multiple foreign
1|Page
keys referring to primary keys in other tables or even the same table.

28. a) XML: Primarily used for storing and transporting structured data. It is flexible and user-defined,
but strict in terms of syntax and structure. Tags in XML are user-defined, meaning users can
create their own tags. XML is case-sensitive XML requires closing tags for all elements XML
requires closing tags for all elements.
HTML: Focuses on displaying and formatting data for web browsers. It is more lenient with
syntax and uses predefined tags for content presentation. HTML has predefined tags that are
used for specific purposes, such as <div>, <a>, <p>, etc.HTML allows optional closing tags for
certain elements
OR
b) i) TELNET is a network protocol that allows a user to remotely access and manage devices over
a network, such as servers, routers, and other networked devices.
ii) Data Transmission Rate (also known as Data Transfer Rate or Bandwidth) refers to the speed
at which data is transmitted over a communication channel or network. It is the amount of
data that can be sent or received in a given period of time.
Units of DTR are bps, Kbps, Mbps, Gbps, Tbps

SECTION – C (3 x 3 = 9)
29. A) def DISPLAY():
f=open(“Article.txt”)
max=0
for i in f.read().split():
if i==i[::-1]:
l=len(i)
if l>max:
max=l
k=i
print(k)
OR
B) def DISPLAY():
f=open(“Article.txt”)
max=0
for i in f:
j=i.split()
if j[1].startswith(‘7’):
print(i)
30. A) Upper case count : 3
Lower case count : 15
OR
B) {'E': 1, 'x': 1, 'c': 1, 'e': 1, 'l': 1}
31. A) hostel =[]
def Push_element(L):
for i in L:
hostel.append(i)
def Pop_element():
while hostel!=[]:
print(hostel.pop())
else:
print(“Stack Empty”)
OR
B) stack=[]
def Push(D):
for i in D:
if D[i]>=900000:
stack.append( [ i, D[i] ])

def pop():
while stack!=[]:
L=stack.pop()
print(L[0],L[1])

SECTION – D (4x 4=16)


2|Page
32. A) Write SQL Queries for the following questions:
i) select sum(SALARY) from Employee where PROJECT is not NULL;
ii) select count(*) from Employee group by PROJECT;
iii) select distinct PROJECT from Employee;
iv) select NAME from Employee where DOB > “1992-10-31”;
OR
B) Write the output of the queries (i) to (iv) based on the table Employee:
i)
NAME PROJECT
Ranjan P01
Muneera P01
Alex P02
Akhtar P04
Satyansh P04
ii)
NAME SALARY
Ranjan 150000
Akhtar 75000

iii)
NAME DOB DOJ
Ranjan 1990-07-12 2015-01-21
Akhtar 1992-06-21 2015-02-01
Muneera 1996-11-15 2018-08-19
iv)
min(DOJ) max(DOB)
2015-01-21 1996-11-15

33. import csv


def Television():
F=open( “Inventroy.csv” ,’r’)
wr=csv.reader(F)
l=[]
cost=0
for i in wr:
l.append(i)
for j in range(1, len(l)):
if i[1]==”Television”:
print(i)
cost+=int(i[3])
print(cost)
F.close()

34. i) select sum(M_Qty), M_Name from MOBILEMASTER natural join MOBILESTOCK


group by M_Id;
ii) select M_Supplier from MOBILEMASTER natural join MOBILESTOCK
where M_Company =”Nokia”;
iii) update MOBILEMASTER set M_Price=M_Price-2000
where M_Mf_Date between “2011-01-01” and “2013-12-31”;
iv) A) select sum(M_price*M_Qty) from MOBILEMASTER natural join MOBILESTOCK
where M_Company=”Micromax”;
OR
B) alter table MOBILEMASTER add discount int;
35. import mysql.connector as ms
con=ms.connect(host=”localhost”, user=”root”, password=”tiger”, database=”school”)
cur=con.cursor()
n=int(input())
for i in range(n):
rno=int(input())
name=input()
dob=input()
3|Page
fee=float(input())
sql=”insert into Student values({},’{}’, ‘{}’,{})”.format(rno,name,dob,fee)
cur.execute(sql)
con.commit()
cur.execute(“update Student set fee=fee+fee*0.1”)
con.commit()

SECTION – E ( 2 x 5 =10)
36. i) import pickle
def input_stock():
f=open(“STOCK.dat”,’wb’)
c = []
n = int(input())
for i in range(n):
ino = int(input())
i_name = input()
dcode = int(input() )
qty = int(input())
uprice=int(input())
c.append([ino, i_name, dcode, qty, uprice])
pickle.dump(c,f)
f.close()
ii) def read_stock():
f=open(“STOCK.dat”,’rb’)
tot=0
try:
while True:
m=pickle.load(f)
for i in m:
tot+=i[3]*i[4]
except EOFError:
print(tot)
f.close()
iii) def update_results():
u=[]
f=open(“STOCK.dat”,’rb’)
try:
while True:
m=pickle.load(f)
for i in m:
if i[1].startswith(“Gel”):
i[4]+=10
u.append(i)
except EOFError:
f.close()
f=open(“STOCK.dat”,’wb’)
pickle.dump(u,f)
f.close()

37. a)

b) Main Building as it has more number of computers.


c) i) Switch/Hub – recommended in all buildings as the number of computers is more.
ii) Repeater – recommended between finance and academic since the distance is 70m
d) 1. Optical fibre
e) i) VOIP OR ii) LAN

***************END OF PAPER***************

4|Page

You might also like