Professional Documents
Culture Documents
Section – B
19. (i) (a) TCP/IP : Transmission control protocol / print ("sum of squares of first two
and last two digits is", sum)
Internet protocol return
(b) CDMA : Code division multiple access OR
(ii) The process of uploading web pages to a public server a = 5
is called web hosting. b = 9
OR def swap(c,d):
(i) Domain name – income.in return d,c
URL-http://www.income.in/home.aboutus.html a, b = swap(a,b)
(ii) Popular web browsers: Google Chrome, Mozilla 22. 250#150
Firefox, Internet Explorer, etc 250#100
130#100
20.
c=dict()
n=int(input("Enter total number")) 23. (i) empdict["Email"]="jack@gmail.com"
(ii) print(t[-3])
i=1
OR
while i<=n: [[[1, 2, 3, 4, 5], [6, 7, 27]], 50]
a=input("enter place") []
b=int(input("Enter number"))
24. Create table toys(ToyId integer, Toyname
c[a]=b
varchar(20), Category varchar(1), Price float(8,2),
i=i+1 Vendor varchar(20));
print ("place","\t","number") Describe toys;
for i in c: OR
print (i,"\t",c[i]) Degree = 8 (No. of columns)
Cardinality = 8 – 2 = 6 (no. of rows)
21. def calcsquareDigits(num):
sum=((num%100)**2)+((int(num/100))**2) 25. [ ] & [25, 20, 15, 10]
Section – C
26. [[[6, 2, 3, 17, 5], [6, 7, 8]], 200]
[[[6, 2, 3, 17, 5], [6, 7, 8]], 200]
[[6, 2, 3, 17, 5]]
27. (i) 38000 1200
(ii) 1075000
(iii) 1004 CAR GPS SYSTEM 50 21500 GEOKNOW T01
1003 DIGITAL CAMERA 12X 160 8000 DIGICLICK T02
1001 DIGITAL PAD 12i 120 11000 XENITA T01
1006 LED SCREEN 40 70 38000 SANTORA T02
1005 PEN DRIVE 32 GB 600 1200 STOREHOME T03
28. def
reverse(): (c) Update STUDENTS Set Address=”C-97” where
file=open("myfile.txt","r") ADDRESS IS NULL;
text=file.readlines() 30. def pushStack(stack,ch):
file.close() stack.append(ch)
n=len(text) top=len(stack)–1
file=open("myfile.txt","w") return
for i in range (n–1,–1,–1): def popStack(stack):
file.writeline(text[i]) if isEmpty(stack):
file.close() return
OR else:
def reverse(): top=len(stack)–1
file=open("Poem.txt","r") for a in range(top–1,–1,–1):
text=file.readlines() print(stack[a])
file.close() stk=[]
line=len(text) top=none
for i in range (line–1,–1,–1): str=input("Enter a string")
print(text[i]) while a in str:
29. (a) Select count(distinct RNO) from Students; pushStack(stk,a)
(b) Select Name , Class, , Address from Students where print("Reverse")
name like “%EE%” order by Sec Desc; popStack(stk)
Answers 3
Section – E
else :
newrec.append(rec)
f.close()
33. (i) _TOWN can house the server as it has the
B
f=open(“Games.dat”,”w”)
maximum no. of computers.
pickle.dump(newrec,f)
(ii)
Optical fibre cable is the best for this star
topology. f.close()
VILLAGE 3 VILLAGE 2 35. (i) In SQL, HAVING clause is used to filter the
1.5 KM 1 KM output obtained by the GROUP BY clause based on
specific condition.
B_TOWN
(ii) import MySQLdb
db = MySQLdb.connect(‘localhost’,
‘HRMan’, ‘HRManexe@pwd’, ‘Employee’)
2 KM
cursor = db.cursor()
VILLAGE 1 sql = “Delete from Employee where
AGE>’%d’/(60)
(iii) Switch try:
(iv) VoIP db.execute(sql)
(v) MAN (Metropolitan Area Network) will be db.commit()
formed as network would span within a city. except:
34. (i) The writerow() function writes a single record or db.rollback()
db.close()
a single list carrying a record, to a csv file.
OR
The writerows() function writes multiple records to
(i) 255 bytes
a csv file ,which may exist together as a nested list.
(ii) import MySQLdb
(ii) Program : db = MySQLdb.connect(‘localhost’, ‘HRMan’,
import csv ‘HRManexe@pwd’, ‘Employee’)
def addMore(): cursor = db.cursor()
f=open(“Tour.dat”,”a”) sql = “Delete from Employee where AGE>’%d’/
trec=[] (60)
fw=csv.writer(f) try:
db.execute(sql)
t=input(“Enter tour id :”)
db.commit()
tn= input(“Enter tour name :”) except:
tr=int(input(“Enter number of db.rollback()
tourists :”)) db.close()
pr= float(input(“Enter tour price:”))
qqq