Professional Documents
Culture Documents
14 c) IS operator 1
15 a) Broadcast device 1
16 d) resultset 1
18 (a) Both A and R are true and R is the correct explanation for A 1
SECTION – B
19 a) SMTP : Simple Mail Transfer Protocol 2
b) VoIP : Voice Over Internet Protocol
Star topology has a single point of failure. If the central hub or
switch fails,
the entire network will be down. This can be a major problem for
networks
that require high availability. Or any other dis advantage.
OR
20 L = [1,2,1,1,2,1,2,3,5,4,1,2,5,4,4,5] 2
D = {}
for x in L:
if x in D:
D[x]+=1
else:
D[x]=1
21 Output : **m2m202 2
(OR)
output :
Original String : success
Hello
Changed String : su!ce@
22 Output: 2
def lenLines(STRING):
t=()
L=STRING.split()
for line in L:
length=len(line)
t=t+(length,)
return t
STRING='Welcome to India'
s=lenLines(STRING)
print(s)
23 Output: 2
(i) L1.insert(1,100)
(ii) S1.isdigit()
OR
24 Output: 2
select * from student where fee IS NULL;
OR
Alter table query
25 50#5 2
SECTION C
26 3
Output:
cbse#bBAaD#eEAa#####
27 Output: (2+1) 3
Based on the above table , Write SQL command for the following :
i) SELECT * FROM TEACHER WHERE DEPT=’MATHS’;
ii) SELECT NAME,DEPT FROM TEACHER WHERE NAME
LIKE ‘M%’;
iii) SELECT * FROM TEACHER WHERE SEX=’F’ AND
SALARY BETWEEN
35000 AND 50000 ;
28 def count_word(): 3
count=0
f=open("textfiles.txt","r")
contents=f.read()
word=contents.split()
for i in word:
if i==’can’:
count+=1
print("Number of words in the File is :",count )
f.close()
count_word()
OR
def SHOWWORD () :
c=0
file=open(‘STORY.TXT,'r')
line = file.read()
word = line.split()
for w in word:
if len(w)<5:
print( w)
file.close()
29 3
30 3
SECTION -D
31 Output: 4
i)SELECT SUM (PERIODS), SUBJECT FROM SCHOOL GROUP
BY SUBJECT ;
ii) SELECT MIN(EXPERIENCE), MAX(CODE) FROM SCHOOL;
iii)SELECT TEACHERNAME, GENDER FROM SCHOOL,
ADMIN WHERE
DESIGNATION = ‘COORDINATOR’ AND
SCHOOL.CODE=ADMIN.CODE;
iv)SELECT COUNT(DISTINCT SUBJECT) FROM SCHOOL;
(1 mark for each correct query)
32 4
SECTION -E
33 Ans: 5
34 5
Ans:
i) What is Pickling or Serialization?
The process of converting Python object hierarchy into byte stream
so that it can
be written into a file.
ii) A binary file “salary.DAT” has structure [employee id, employee
name, salary]. Write a function countrec() in Python that would read
contents of the file “salary.DAT” and display the details of those
employee whose salary is above 20000.
OR
I) r is used to read text files and rb is used to read binary files
II)
35 i) 5
Degree: The total number of attributes which in the relation is called
the
degree of the relation.
Cardinality: Total number of rows present in the Table.
(any suitable example)
ii)