Sec B
Sec B
SECTION B
19 Expand the following terms related to Computer Networks: 1+1=2
(i) a. SMTP b. POP
(ii) Out of the following, which is the fastest wired and wireless medium
of transmission?
Infrared, coaxial cable, optical fiber, microwave, Ethernet cable
OR
Def oddtoeven(L)
For i in range(len(L)):
if(L[i]%2 !=0):
L[i] = L[i]*2
print(L)
21 Write a function count (city) in Python, that takes the dictionary, PLACES as an 2
argument and displays the names (in lowercase) of the places whose names are less than
7 characters.
For example, Consider the following dictionary
City ={1:"Delhi",2:"London",3:"Kolkata",4:"NewYork",5:"Moscow"}
The output should be: “Delhi”, ”London”, ”Moscow”
OR
Write a function, Words_Length(STRING), that takes a string as an argument and
returns a tuple containing length of each word of a string.For example, if the string is
"this too shall pass", the tuple will have (4, 3, 5,4)
[4]
22 Predict the output of the following code: 2
OR
Predict the output of the Python code given below:
24 Ms. Shweta has just created a table named “Employee” containing columns Empno, 2
Ename,Department and Salary.
After creating the table, she realized that she has forgotten to apply primary key
constraint in Empno column. Help her in writing an SQL command toadd a
primary key constraint to Empno column to the table Employee.
OR
Angel has created table School with column sid,Student_name,DOB,Fee,City. Later
she realized that she has forgotten to apply primary key in sid, also she wants to
change the column name from sid to student_id. Help her to change the column
name to student_id from sid and also apply primary key in it.
[5]
25 Predict the output of the following code: 2
SECTION B
19. Ravi has written a function to print Fibonacci series for first 10 element. His code is
havingerrors.Rewritethecorrectcodeandunderlinethecorrectionsmade.Someinitial elements
(2)
ofFibonacci series are:
deffibonacci()
first=0
second=1
print((“first no. is “, first)
print(“secondno.is,second)
for a in range (1,9):
third=first+second
print(third)
first,second=second,third
fibonacci()
20. What possible outputs (s) are expected to be displayed on screen at the time of (2)
executionoftheprogramfromthefollowingcode?Alsospecifythemaximumvalues that can
be assigned to each of the variables FROM and TO.
import random
AR=[20,30,40,50,60,70]
FROM=random.randint(1,3)
TO=random.randint(2,4)
forKinrange(FROM,TO+1):
print(AR[K],end=”#“ )
OR
defDisplay(str):
m=""
foriinrange(0,len(str)):
if(str[i].isupper()):
m=m+str[i].lower()
elif str[i].islower():
m=m+str[i].upper()
else:
if i%2==0:
m=m+str[i-1]
else:
m=m+"#"
print(m)
Display('Fun@World2.0')
25. Considerthefollowingtwocommandswithreferencetoatable,namedStudents, having a (2)
column named Section:
(a) Selectcount(Section)from Students;
(b) Selectcount(*)fromStudents;
Ifthesetwo commandsareproducingdifferentresults,
(i) What may bethe possible reason?
(ii) Whichcommand,(a)or(b),mightbegivinghighervalue?
OR
Nametheaggregatefunctionswhichworkonlywithnumericdata,andthosethatwork with
any type of data.
SECTION B
19. Ravi has written a function to print Fibonacci series for first 10 element. His code is
havingerrors.Rewritethecorrectcodeandunderlinethecorrectionsmade.Someinitial elements
(2)
ofFibonacci series are:
deffibonacci()
first=0
second=1
print((“first no. is “, first)
print(“secondno.is,second)
for a in range (1,9):
third=first+second
print(third)
first,second=second,third
fibonacci()
20. What possible outputs (s) are expected to be displayed on screen at the time of (2)
executionoftheprogramfromthefollowingcode?Alsospecifythemaximumvalues that can
be assigned to each of the variables FROM and TO.
import random
AR=[20,30,40,50,60,70]
FROM=random.randint(1,3)
TO=random.randint(2,4)
forKinrange(FROM,TO+1):
print(AR[K],end=”#“ )
OR
defDisplay(str):
m=""
foriinrange(0,len(str)):
if(str[i].isupper()):
m=m+str[i].lower()
elif str[i].islower():
m=m+str[i].upper()
else:
if i%2==0:
m=m+str[i-1]
else:
m=m+"#"
print(m)
Display('Fun@World2.0')
25. Considerthefollowingtwocommandswithreferencetoatable,namedStudents, having a (2)
column named Section:
(c) Selectcount(Section)from Students;
(d) Selectcount(*)fromStudents;
Ifthesetwo commandsareproducingdifferentresults,
(i) What may bethe possible reason?
(ii) Whichcommand,(a)or(b),mightbegivinghighervalue?
OR
Nametheaggregatefunctionswhichworkonlywithnumericdata,andthosethatwork with
any type of data.
SECTION B
Q19. 1+1
(i) Expand the following terms: =2
SMTP , FTP
OR
import random num1=int(random.random()
+0.5)
What will be the minimum and maximum possible values of variable num1
Q24. Ms. Tejasvi has just created a table named “Student” containing columns sname, Class and Mark. (2)
After creating the table, she realized that she has forgotten to add a primary key column in the
table. Help her in writing an SQL command to add a primary key column StuId of integer type to
the table Student.
Thereafter, write the command to insert the following record in the table:
StuId- 1299
Sname- Shweta
Class: XII
Mark: 98
Q25. Predict the output of the following code: (2)
value = 50
def display(N):
global value
value = 25
if N%7==0:
value = value +
N else:
value = value -
N print(value,
end="#") display(20)
print(value)
OR
Predict the output of the Python code given below:
a=20
def call():
global a
b=20
a=a+b
return a
print(a)
call()
print(a)
SECTION B
19. i) Expand the following terms: SMTP, URL 2
ii) Difference between HTML and XML
OR
i) What is Band width?
ii) Define baud rate?
20. Rewrite the program after correcting all the errors and underline each correction. 2
n=int(input("Enter number:"))
temp==n rev=0
While(n>0)
dig=n%10
rev=rev*10+di
g n=n//10
if(temp==rev):
print(The number is a palindrome!)
else:
print("The number isn't a palindrome!")
22. Mr. Avinash wants to create a table in MySQL for Employee (eid (Primary Key), 2
ename, salary)
OR
Write any two differences between DELETE and DROP commands
23. Write a python statement for each of the following tasks using built-in functions/ 2
methods only:
i)To add list of elements L2=[11,12,14] to existing list L1=[10,15].
ii)To make the elements in sorted manner.
OR
A list named stu_percentage stores the percentage of students of a class. Write
python command to import the required module and display the most common
percentage from the given list.
24. Find output generated by the following code: 2
string="aabbcc"
count=3
while
True:
if string[0]=='a':
string=string[2:]
elif string[-
1]=='b':
string=string[:2]
else:
count+=1
break
print(string)
print(count)
25. Find output generated by the following code: 2
def Compy(N1,N2=10):
return N1 > N2
NUM= [10,23,14,54,32]
for VAR in range (4,0,-1):
A=NUM[VAR]
B=NUM[VAR-1]
if VAR > len(NUM)//2:
print(Compy(A,B),'#', end=' ')
else:
print(Compy(B),'%',end=' ')
SECTIONB
19. (i) Expand the following terms 1+1=2
IMAP DNS
(ii)Write two points of difference between Switch and Router.
OR
(i) Define the term bandwidth with respect to networks
(ii)Write two points of difference between Web Server and Web Browser
20. The code given below accepts a number as an argument and checks whether the given number is perfect 2
number or not. Observe the following code carefully and rewrite it after removing all syntax and
logical errors. Underline all the corrections made.
21. Write a function countNow (DAYS) in Python, that takes the dictionary, DAYS as an argument and 2
displays the names (in lowercase) of the days whose names are longer than 7 characters. For example,
Consider the following dictionary
DAYS={1:"MONDAY",2:"TUESDAY",3:"WEDNESDAY",4:"THURSDAY",5:"FRIDAY",6:”
SATURDAY”,7:”SUNDAY”}
The output should be:
wednesday
thursday
saturday
OR
Write a function, lenWords(STRING), that takes a string as an argument and returns a list
containing length of each word of a string.
For example, if the string is "we are writing preboard exams ", the list
will have [2, 3, 7, 8, 5]
22. Predict the output of the following code: 2
23. Write the Python statement for each of the following tasks using BUILT-IN functions / 1+1=2
methods only:
(i) To update dictionary d1 with dictionary d2
(ii)To convert only starting letter in string named, message into uppercase letter.
OR
A list named studentMarks stores marks of students of a class. Write the Python comm and to
import the required module and (using built-in function) to display average value from the
given list.
24. Mr. Raja has just created a table named “Employee” containing columns Ename, Department 2
and Salary. After creating the table, he realized that he has forgotten to add a primary key column in
the table. Help him in writing an SQL command to add aprimary key column EmpId of integer type
to the table Employee. Thereafter, write the command to insert the following record in the table:
EmpId- 999 ,Ename- Shweta ,Department: Production, Salary: 26900
OR
A music store MySports is considering to maintain their inventory using SQL to store the data. The
detail is as follow:
Table: SPORTS
SCODE SPORTNAME NOOFPLAYERS COACHNAME
S001 CRICKET 21 RAHUL DRAVID
S002 FOOTBALL 25 ROSHAN LAL
S003 HOCKEY 40 SRADAR SINGH
S004 CRICKET 19 CHETAN SHARMA
S005 ARCHERY 12 LIMBARAM
S006 SHOTTING 17 DEEPIKA KUMARI
25. Find and write the output of the following Python code: 2
खंड / SECTION-B
19. Rewrite the following code in python after removing all syntax error(s). Underline each
correction done in the code.
Num=int(rawinput("Number greater than 10 :")) sum=0
for i in range(10,Num,3)
sum+=1
if i%2=0:
print(i*2)
else: print(i*3)
print(sum)
OR
Predict the output of the Python code given below:
a=tuple()
a=a + tuple(‘Python’)
print(a) print(len(a))
b=(10,20,30)
print(len(b))
SECTION - B
19 i) Expand the following :
a) SMTP b) VoIP
ii) Give one disadvantage of Star topology
1+1=2
OR
i) What is a web browser ?
ii) Define the term MAC Address
20 Rewrite the following code in Python after removing all syntax error(s) and
underline each correction done in the code .
30 = num
for k in range(0,num)
2
IF k%4==0 :
print(k*4)
Else:
print(k+3)
21 Write a function letter_count(lst) that takes a list of string and returns a
dictionary where the keys are the letters from lst and the values are the number
of times that letter appears in the lst.
For example: if the passed list, lst is :
lst=list(“apple”)
2
Then it should return a dictionary as {‘a’:1,’p’:2,’l’:1,’e’:1}
OR
Write a function max_length( ) ,that takes a list of string as argument and
display the longest string from the list.
22 Predict the output of the following code:
lst=[2,4,6,8,10]
for i in range(1,5):
2
lst[i-1]=lst[i]
for i in range(0,5):
print(lst[i],end=' ')
23 Consider the following list of elements and write Python statement to print the
output of each question.
elements=['apple',200,300,'red','blue','grapes'] 2
i) print(elements[3:5])
ii) print(elements[::-1])
SECTION B
11. Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the
code.
2
30=Value
12. Write two points of difference between Bus Topology and Tree Topology. 2
OR
Write two points of difference between Packet Switching and Circuit Switching techniques?
D[‘EXAM’]=’PRE2’
print(D.items())
x=int(“Entervalueofx:”) for
in range [0,10]:
if x=y
print( x +y)
else:
print(x‐y)
20 (a) 2
Findoutputgeneratedbythefollowingcode:
Str="Computer"
Str= Str[-4:]
print(Str*2)
OR
Considerthefollowinglines ofcodes inPython andwritetheappropriateoutput:
student={'rollno':1001,'name':'Akshay','age':17}
student['name']= “Abhay”
print(student)
21 What do you mean by Foreign key? How it is related with Referential Integrity? 2
22 Findoutputgeneratedbythefollowingcode: 2
string="aabbcc"
count=3
whileTrue:
if string[0]=='a':
string=string[2:]
elifstring[-1]=='b':
string=string[:2]
else:
count+=1
break
print(string)
print(count)
23 Expandthefollowingterms: 2
i. NIC
ii. TCP/IP
iii. POP
iv. SMTP
24 Writeoneadvantageandonedisadvantageofeach –STARTopologyandTreeTopology OR 2
25 DifferentiatebetweenDDLandDML? OR 2
WritethemaindifferencebetweenINSERTandUPDATECommandsinSQL
SECTION - B
19 Find error in the following code(if any) and correct code by rewriting code and underline 2
the correction;‐
s = [11, 13, 15]
for n in len(s):
tot = tot + s(n)
print(tot)
20 Find output generated by the following code: 2
SECTION-B
a) CircuitSwitchingandPacketSwitching.
b) Co-axialcableandFiber–opticcable.
20 Preetyhaswrittenacodetoaddtwonumbers.Hercodeishavingerrors. Rewrite 2
the corrected code and underline the corrections made.
defsum(arg1,arg2):
total=arg1+arg2;
print(”Total:”,total)
returntotal;
sum(10,20)
21 PredicttheoutputofthePythoncodegivenbelow: List1 2
= list("Examination")
List2=List1[1:-1]
new_list = []
fori inList2:
j=List2.index(i)
if j%2==0:
List1.remove(i)
print(List1)
22 Writeafunctionchange(L),whereListhelistofelementspassedasargument to the 2
function. The function arranges odd numbers and even numbers separately in
two lists and displays them.
Forexample:
IfL=[10, 20, 30,40, 12,11,13,15]
Thenfunctionwillcreate anddisplaytwo lists:
Listofeven elements:[10,20, 30,40, 12]
Listofoddelements:[11,13,15]
OR
WriteafunctionINDEX_LIST(S),whereSisastring.Thefunctionreturnsa list
named ‘indexList’ that stores the indices of all vowels of S.
Forexample:IfSis"Computer",thenindexListshouldbe[1,4,6]
23 WritethePythonstatementforeachofthefollowingtasksusingBUILTIN 2
functions/methods only :
(i) Toinsert an element150 at theSecond position,inthelist L1.
(ii) Toconvert astringnamed,messageinuppercase.
OR
WritethePythoncommandtoimporttherequiredmoduleand(usingbuilt-in function)
find out the factorial of a given no i.e 5.
24 An organization SoftSolutions is considering to maintain their employees 2
recordsusingSQLtostorethedata.Asadatabase administrator,Murthyhas decided
that :
• Nameofthe table-HRDATA
• TheattributesofHRDATAareasfollows:
ECode– Numeric
EName–characterofsize30 Desig
– Character of size 15 Remn –
numeric
NowhelpMurthytocreatetableandinsertonerecord(80008,Arjun,Admin, 55000)
into the table.
OR
CityHospitalisconsideringtomaintaintheirinventoryusingSQLtostorethe data. As
a database administer, Ritika has decided that :
• Nameofthedatabase -CH
• Nameofthe table-CHStore
• TheattributesofCHStoreareasfollows:
ItemNo- numeric
ItemName–characterofsize20
Scode - numeric
Quantity– numeric
Now Ritika wants to remove the column Quantity from the table CHStore .
And she also wants to display the structure of the table CHStore, i.e, name of
theattributesandtheirrespectivedatatypesthatshehasusedinthetable.Help her to
writethe correct command .
25 PredicttheoutputofthePythoncodegivenbelow: def 2
Diff(N1,N2):
if N1>N2:
returnN1-N2
else:
return N2-N1
NUM=[10,23, 14,54,32]
for CNT in range(4,0,-1):
A=NUM[CNT]
B=NUM[CNT-1]
print(Diff(A,B), “#”,end=”“)
Section – B
Q19. Manish has designed a Python program to calculate factorial of a number passed as argument, (2)
but he is getting errors while executing the code. Rewrite his code after removing errors and
underline each correction.
def factorial():
fact=1
while N>0:
fact=*N
N=N-1
print(“Factorial’ ,fact)
#main( )
Factorial(5)
Q20. Differentiate between Star Topology and Bus Topology. Write two points of difference. (2)
OR
Write two point of difference between Bridge and Gateway.
Q21. (a) Write the output of when Python string declaration is given as follows: - (1)
Mystr=”I love technology while growing up”
print(Mystr[1:len(Mystr):2])
(1)
(b) Write the output of the code given below:
Student_details = {"name": "aditya", "age":
16} New=Student_details.copy()
New['address'] = "Mumbai"
print(Student_details);
print(New)
Q22. Explain the Relational Database Management System terminologies- Degree and Attribute of a (2)
relation. Give example to support your answer.
Q23. (a) Write the full forms of the following: - (i) FTP (ii) POP (2)
(b) What is MAC address?
#Main
N=[5,13,47,9]
modify(N)
23
24
SECTION B ( 14 Marks)
19. (a) 18 Gbps is equal to how many bits per second? 2
(b) Write any two differences between twisted pair cable and coaxial cable.
OR
(a) What do you mean by a modem?
(b) Write the purpose of a router.
20. Sunita has written certain code to work with tuples. He is getting some errors. Find the errors: 2
t1=(10,20,30, 40,50,60,70,80)
t2=(90,100,110, 120)
t3=t1*t2
Print (t5
[0:12:3])
t1[2]=100
21. Write a function dispTop(SCORES) in Python, that takes a dictionary SCORES as an 2
argument and returns the names in uppercase of those players who scored more than 50 as a
list.
25
23. Write the Python statement for each of the following tasks using BUILT- 2
IN functions/methods only:
(a) To display only the last two keys of the dictionary named D
(b) To display the elements of the list Lst from index -10 to -4 in reverse order.
OR
Write the output of the following code snippet:
tup = ('cold',)
n=4
for i in range(int(n)):
if i % 2 == 0:
tup = (tup,'cold')
else:
if i > 1:
continue
tup = (tup , 'hot')
print(tup)
24. Differentiate between ‘WHERE’ clause and ‘HAVING’ clause in MySQL with appropriate 2
example.
OR
26
Example:
OR
27
Example:
A python is a powerful
Language is user friendly
It is platform independent Language
def ChangeLst():
L=[]
L1=[]
L2=[]
for i in range(1,10):
L.append(i)
for i in range(10,1,-2):
L1.append(i)
for i in range(len(L1)):
L2.append(L1[i]+L[i])
L2.append(len(L)-len(L1))
print(L2)
ChangeLst()
23 Write the Python statement for each of the following tasks using BUILT-IN 2
functions/methods only:
(i) To insert an element 400 at the fourth position, in the list L1.
(ii) To check whether a string named, message ends with a full stop/ period
or not.
OR
A list named employee salary stores salary of employees. Write the Python
command to import the required module and (using built-in function) to display the
most common salary value from the given list.
24 Ms. Ragini has just created a table named “Customer” containing columns Cname,
Department and Salary.
After creating the table, she realized that she has forgotten to add a primary key
column in the table. Help her in writing an SQL command to add a primary key
column Custid of integer type to the table Customer.
Thereafter, write the command to insert the following record in the table:
Custid- 555
Cname- Nandini
Department: Management
Salary- 45600
OR
28
29|Page
22 (a) Given is a Python string declaration: 1
st = ‘AMPLIFY&LITUTE’
Write the output of : print(st.count(‘PLI’,2,12))
1
(b) Write the output of the code given below:
D = {‘A’:’AJAY’ , ‘GRADE’:’A’}
print(list(D.values()))
23 Expand the following terms: 2
(i) PPP (ii) SMTP (iii) VoIP (iv) TCP/IP
24 Explain the following: 2
(i) Primary Key (ii) Foreign Key
25 Define constraint in context with Relational Database Management System. Explain any two 2
constraints of MySQL.
SECTIONB
19 Sameerhaswrittenapythonfunctiontocomputethe reverseofanumber. 2
. Hehashowevercommittedafewerrorsinhiscode.Rewritethecodeafter removing
errors also underline the corrections made.
definereverse(num):
rev = 0
While num > 0:
rem==num %10
rev=rev*10+rem
num = num//10
returnrev
print(reverse(1234))
20 MentiontwodifferencesbetweenaHubandaswitchinnetworking. 2
.
OR
MentiononeadvantageandonedisadvantageofStarTopology.
21 a) Whatwillbetheoutputofthefollowingstringoperation. 1
. str="PYTHON@LANGUAGE"
print(str[2:12:2])
b) Writetheoutputofthefollowingcode. 1
data = [1,2,4,5]
forxindata: x
= x + 10
print(data)
22 MentiontwodifferencesbetweenaPRIMARYKEYandaUNIQUEKEY. 2
.
30|Page
23 a) Expandthefollowingabbreviations: 1
. i) URL ii)TCP
b) Whatistheuseof VoIP? 1
24 Predicttheoutputofthefollowingpythoncode: def 2
. foo(s1,s2):
l1=[]
l2=[]
for x in s1:
l1.append(x)
for x in s2:
l2.append(x)
return l1,l2
a,b=foo("FUN",'DAY')
print(a,b)
OR
Predicttheoutputofthefollowingpythoncode: data =
[2,4,2,1,2,1,3,3,4,4]
d ={}
forxindata: if
x in d:
d[x]=d[x]+1
else:
d[x]=1
print(d)
31|Page
25 AMySQLtable,saleshave10rows.Thefollowingquerieswereexecutedon the sales 2
. table.
SELECTCOUNT(*)FROMsales;
COUNT(*)
10
SELECTCOUNT(discount)FROMsales
; COUNT(discount)
6
Writeastatementtoexplainastowhythereisadifferenceinboththe counts.
OR
WhatisthedifferencebetweenaCandidateKeyandanAlternateKey
SECTION B
19. Preety has written a code to add two numbers .Her code is having errors. Rewrite the correct code and 2
underline the corrections made.
def sum(arg1,arg2):
total=arg1+arg2;
print(”Total:”,total)
return total;
sum(10,20)
print(”Total:”,total)
20. Write two points of difference between Hub and Switch. 2
OR
Write two points of difference between Web PageL and Web site.
21. Write the output of following code and explain the difference between a*3 and (a,a,a) a=(1,2,3) 2
print(a*3)
print(a,a,a)
32|Page
25 Write the output of the queries (a) to (d) based on the table 2
SECTIONB
deffibonacci()
first=0
second=1
print((“first no. is “, first)
print(“secondno.is,second)
for a in range (1,9):
third=first+second
print(third)
first,second=second,third
fibonacci()
2 GivedifferencebetweenVideoConferencingand Chatting 2
OR
WritetwopointsofdifferencebetweenMessageSwitchingandPacket Switching
33|Page
(b) Write the output of the code given below:
Employee1={'name':'John','salary':10000,'age':24}
Employee2={'name':'Divya','salary':54000,'dept':'Sales'} 1
Employee1.update(Employee2)
print(Employee1)
4 Explain the use of „Primary key‟ in a Relational Database Management System. Give example to 2
support your answer.
5 (a)Writethefull forms ofthefollowing: 2
(i)GSM (ii)XML
34|Page
24 (a)Predicttheoutput ofthePythoncode givenbelow: 2
def
D
i
s
p
l
a
y
(
s
t
r
)
:
m
=
"
"
foriin
r
a
n
g
e(
0,
le
n(
st
r)
):
if(
st
r[
i].
is
u
p
p
er
()
):
m
=m+
str[i]
.lowe
r()
elif
str[i]
.islo
35|Page
wer(
):
m=m+str[i].upper()
else:
if i%2==0:
m
=
m
+
s
t
r
[
i
-
1
]
e
l
s
e
:
m=m+"#"
print(
m)
Display('F
un@Worl
d2.0')
OR
(b)Predicttheoutput ofthePythoncode givenbelow:
36|Page
,x[2:
4])
print(x[2:-3],x[-4:-2])
25 DifferentiatebetweenWHEREandHAVINGclauseinMySql. 2
OR
WhatdoyouunderstandbythetermsDegree,cardinalityofaRelation?Explainwithan example.
SECTIONB
19 Aarti has written a code to input an integer and check whether it is 2
evenorodd.Thecodehaserrors.Rewritethecodeafterremovingall the syntactical
errors, underlining each correction:
checkvaldef():
x=input("Enteranumber") if x
% 2 == 0
print(x,"iseven") else;
37|Page
print(x,"isodd")
20 Whatisthedifferencebetweenhubandswitch?Whichismore preferable in a large 2
network of computers and why?
OR
DifferentiatebetweenWANandMAN.AlsogiveanexampleofWAN.
21 (a)GivenisaPythonstringdeclaration: 2
str="Kendriya Vidyalaya Sangathan" Write
the output of: print(str[9:17])
(b)Writetheoutputofthecodegivenbelow: lst1 = [10,
15, 20, 25, 30]
lst1.insert(3, 4)
lst1.insert(2,3) print
(lst1[-5])
22 WhatareconstraintsinSQL?Givetwo examples. 2
23 (a)Writethefullformsofthe following: 2
(i)TCP(ii)VPN
(b)WhatistheuseofFTP?
24 PredicttheoutputofthePythoncodegivenbelow: value = 50 2
def display(N):
globalvalue
value = 25if
N%7==0:
value=value+N else:
value=value-N print(value,
end="#") display(20)
print(value)
OR
PredicttheoutputofthePythoncodegivenbelow: a=20
def call():
globala
b=20
a=a+b
returna
print(a)
call()
print(a)
SECTION-B
38|Page
19 Observe the following Python code very carefully and rewrite it after removing 2
all syntactical errors with each correction underlined.
DEF execmain():
x = input("Enter a number:")
if (abs(x)== x)
print("You entered a positive number")
else:
x=*1
print("Number made positive:" x )
20 Write two differences between Coaxial and Fiber transmission media. 2
OR
Write components of data communication.
22 How many candidate key and primary key a table can have? Can we declare 2
combination of fields as a primary key?
23 (a) Write the full forms of the following: 1+1=2
(i) FTP (ii) MAC
(b) What is the use of TELNET?
39|Page
24 Predict the output of the Python code given below: 2
def Swap (a,b ) :
if a>b:
print(“changed ”,end=“”)
return b,a
else:
print(“unchanged ”,end=“”)
return a,b
data=[11,22,16,50,30]
for i in range (4,0,-1):
print(Swap(data[i],data[i-1]))
OR
Predict the output of the Python code given below: P
= (10, 20, 30, 40, 50 ,60,70,80,90)
Q =list(P)
R = []
for i in Q:
if i%3==0:
R.append(i)
R = tuple(R)
print(R)
25 Differentiate between DDL and DML commands with suitable example. 2
OR
What is the difference between WHERE and HAVING clause of SQL
statement?
SECTION B
1. Rewrite the following code in python after removing all syntax error(s). Underline each correction done
in the code.
2
30=Value
print (VAL*4)
Elseif val%5==0:
print (VAL+3)
else
print(VAL+10)
2. Write two points of difference between Bus Topology and Tree Topology. 2
OR
Write two points of difference between Packet Switching and Circuit Switching techniques?
D[‘EXAM’]=’PRE2’
print(D.items())
def fun(L):
for i in range(len(L)): if(L[i]
%3==0 and L[i]%2==0):
L[i]=L[i]+1
print(L)
return(L)
print(L)
k=fun()
print(k)
OR
Predict the output of the Python code given below:
T = (9,18,27,36,45,54)
L=list(T)
L1 = []
for i in L:
if i%6==0:
L1.append(i)
T1 = tuple(L1)
print(T1)
41|Page
7. Differentiate between WHERE and HAVING with appropriate examples. 2
OR
Differentiate between COUNT() AND COUNT(*) with appropriate examples.
Section – B
Q19. Vivek has written a code to input a number and check whether it is even or odd number. His code (2)
is having errors. Rewrite the correct code and underline the corrections made.
Def checkNumber(N):
status = N%2
return
#main-code
num=int( input(“ Enter a number to check :))
k=checkNumber(num)
if k = 0:
print(“This is EVEN number”)
else:
print(“This is ODD number”)
Q20. Write two points of difference between Bus topology and star topology. (2)
OR
Write two points of difference between XML and HTML.
Q22. Explain the use of ‘Foreign Key’ in a Relational Database Management System. Give example to (2)
42|Page
support your answer.
Q24. Predict the output of the Python code given below: (2)
data=["L",20,"M",40,"N",60]
times=0
alpha=""
add=0
for c in range(1,6,2):
times = times + c
alpha = alpha + data [c-1] + "@"
add = add + data[c]
print (times, add, alpha)
OR
Q25. Differentiate between order by and group by clause in SQL with appropriate example. (2)
OR
43|Page
Categorize the following commands as DDL or DML:
INSERT, UPDATE, ALTER, DROP
SECTION B
19. Mohit has written a code to input a positive integer and display its factorial. His code is (2)
having errors. Rewrite the correct code and underline the corrections made. (factorial of
a number n is the product 1x2x3. . .n)
n=int(input("Enter a positive integer: ")
f=0
for i in
range(n):
f*=i
print(f)
20. Write two points of difference between LAN and MAN. (2)
OR
44|Page
21. (a) Write a Python statement to display alternate characters of a string, named (1)
my_exam. For example, if my_exam="Russia Ukraine"
The statement should display Rsi kan
23. (a) Write the full forms of the following: (i) VoIP (ii) IMAP (1)
(b) Name the communication medium which is used for WiFi. (1)
24. Predict the output of the Python code given below: (2)
def Alpha(N1):
while
N1:
a=N1.pop()
if a%5>2: print(a,end='@')else: break
NUM=[13,24,12,53,34]
Alpha(NUM); print(NUM)
OR
Predict the output of the Python code given below:
T1 = tuple("Amsterdam")
T2, new_list = T1[1:-1], []for i in
T2: if i in 'aeiou':
j=T1.index(i)
new_list+=[j]
print(new_list)
25. If a column score in a table match has five entries, viz. 30,65,NULL,40,NULL,then (2)
what will be the output of the following query?
Select count(*), avg(score) from match;
OR
Write two differences between HAVING and WHERE clauses in SQL.
45|Page
46|Page
47|Page