22 IT Research Paper
22 IT Research Paper
22 IT Research Paper
mwpTWj;jy;fs;:
vy;yh tpdhf;fSf;Fk; tpil vOJf.
tpilj;jhspy; jug;gl;Ls;s ,lj;jpy; ckJ Rl;nlz;iz vOJf.
tpilj;jhspd; kWgf;fj;jpy; jug;gl;Ls;s mwpTWj;jy;fisf; ftdkhf thrpj;Jg; gpd;gw;Wf.
1 njhlf;fk; 50 tiuAs;s tpdhf;fs; xt;nthd;Wf;Fk; (1),(2),(3),(4),(5) vd ,yf;fkplg;gl;l
tpilfspy; rupahd my;yJ kpfg; nghUj;jkhd tpiliaj; njupe;njLj;J> mjidf; Fwpj;J
epw;Fk; ,yf;fj;ijj; jug;gl;Ls;s mwpTWj;jy;fSf;F mika tpilj;jhspy; Gs;sb (x) ,Ltjd;
%yk; fhl;Lf.
fzpg;ghd;fisg; gad;gLj;Jtjw;F ,lkspf;fg;glkhl;lhJ.
[See page 2
AL/2022/20/T-I -2-
10 0 0
A
B
C
Z
Z C
A Z
B
III
A
B
Z
C
(1) I khj;jpuk; (2) I,II khj;jpuk; (3) I,III khj;jpuk; (4) II,III khj;jpuk; (5) I,II,III midj;Jk;
[See page 3
AL/2022/20/T-I -3-
10. G+ypad; Nfhit 𝐴̅𝐵𝐶 + 𝐴𝐵̅𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶 ,dJ RUf;fg;gl;l tpisT ahJ?
(1) 𝐴𝐵 + 𝐵̅𝐶 + 𝐴𝐶̅ (2) 𝐴𝐵 + 𝐵𝐶 + 𝐴𝐶 (3) 𝐴𝐵̅ + 𝐵𝐶 + 𝐴𝐶
(4) 𝐴𝐵 + 𝐵̅𝐶̅ + 𝐴𝐶 (5) 𝐴̅𝐵 + 𝐵̅𝐶 + 𝐴̅𝐶̅
14. juTj; njhlu;ghly; Kiwikfspy; OSI khjpupapy; ve;j mLf;fpy; (layer) topg;gLj;jp (router)
nraw;gLfpd;wJ?
(1) ngsjpf mLf;F (physical layer) (2) gpuNahf mLf;F (application layer)
(3) jutpizg;G mLf;F (data link layer) (4) tiyaikg;G mLf;F (network layer)
(5) epfo;j;Jif mLf;F (presentation layer)
[See page 4
AL/2022/20/T-I -4-
[See page 6
-6-
AL/2022/20/T-I
[See page 7
AL/2022/20/T-I
-7-
29. Inventory (PartNo, Warehouse, Location, Quantity, Weight, Colour) vDk; ml;ltizapidf;
fUJf.
Weight, Colour Mfpait PartNo ,y; jq;fpAs;sd
Quantity MdJ (PartNo, Warehouse) ,y; jq;fpAs;sJ
Location MdJ Warehouse ,y; jq;fpAs;sJ
ml;ltiz njhlu;gpy; gpd;tUk; $w;Wf;fSs; rupahdJ vJ?
(1) mJ 0NF ,y; cs;sJ (2) mJ 1NF ,y; cs;sJ (3) mJ 2NF ,y; cs;sJ
(4) mJ 3NF ,y; cs;sJ (5) mJ BCNF ,y; cs;sJ
① ② ③
[See page 8
AL/2022/20/T-I -8-
x = "awesome"
def myfunc():
global x
x = "fantastic"
print ("Python is " + x)
myfunc()
print ("Python is " + x)
(1) A khj;jpuk; (2) B khj;jpuk; (3) A,C khj;jpuk; (4) A,B,C khj;jpuk; (5) A,B,C,D midj;Jk;
[See page 9
AL/2022/20/T-I -9-
res = 'A'
n =int(input())
if n > 5:
res = 'P'
if n > 8:
res = 'Q'
else:
res = 'R'
if n > 10:
res = 'S'
else:
res='Z'
print(res)
36. print(5 | 2 ^ 3 >> 2) vDk; igj;jhd; $w;W epiwNtw;wg;gl;ljd; gpd;du;> tUtpisT ahjhf
,Uf;Fk;?
(1) 2 (2) 7 (3) 3 (4) 1 (5) 0
Start
i=1
Is No
i <= N ? Stop
Yes
Is No
N mod i =0 ?
Yes
Print i
i=i+1
[See page 10
AL/2022/20/T-I
-10-
(1) I khj;jpuk; (2) II khj;jpuk; (3) III khj;jpuk; (4) I,II khj;jpuk; (5) I,II,III midj;Jk;
a = int(input())
n1, n2 = 0, 1
count = 0
while count < a:
print(n1,end=' ')
n = n1 + n2
n1 = n2
n2 = n
count += 1
[See page 11
AL/2022/20/T-I -11-
45. PHP GET kw;Wk; POST Ntz;Liffs; njhlu;ghd gpd;tUk; $w;Wf;fspy; gpioahdJ vJ?
(1) GET Ntz;Lif (request) KiwAld; Xu; gbtj;jpypUe;J (form) mDg;gg;gLfpd;w
jftyhdJ URL ,y; fhl;rpg;gLj;jg;gLfpd;wJ
(2) GET Ntz;LifahdJ mDg;gg;gLfpd;w jftypdJ mstpy; tiuaiwapidf; (limits)
nfhz;Ls;sJ
(3) POST Ntz;Liffs; gJf;fg;gl (cached) Kbahjit
(4) GET Ntz;Liffs; tiy NkNyhb tuyhw;wpy; (web browser history)
itj;jpUf;fg;gLfpd;wd
(5) POST Ntz;Liffs; Gj;jfmilahskplg;gl (bookmarked) KbAk;
<?php
$cars = array("Volvo", "BMW", "Toyota");
$arrlength = count($cars);
for($x = 0; $x < $arrlength-1; $x++)
{
echo $cars[$x]." ";
}
?>
NkYs;s PHP script epiwNtw;wg;gLk;NghJ tiyNkNyhbapd;kPJ ngwg;gLfpd;w tUtpisT
ahjhf ,Uf;Fk;?
(1) Volvo BMW Toyota (2) Toyota BMW Volvo (3) Volvo BMW
(4) BMW Volvo (5) 3
[See page 13
AL/2022/20/T-I -13-
***
[ End
AL/2022/20/T-II
-1-
KOg;gjpg;GupikAilaJ / All Rights Reserved ]
Rl;nlz; : ………………………………………
(a)
(i) gpd;tUk; tpistpid tiyNkNyhb xd;wpy; ngWtjw;fhd HTML FwpKiwf;
$W fPNo jug;gLfpd;wJ. mtw;wpd; ,ilntspfisg; nghUj;jkhd tpjj;jpy; epug;Gf.
<……..>
<…….> Violin </……>
<…….> - a string instrument </……>
<…….> Clarinet </…….>
<…….> - a wind instrument </…….>
</…….>
[2 marks]
(ii) gpd;tUk; tiyg;gf;fj;jpidf; fUJf.
<html>
<head>
<title> Registration </title>
</head>
<body>
<form action="register.php" method="post">
<fieldset>
<legend> Register </legend>
Full Name: <input type="……………………" name="name"/>
<p> Mail Address: <input type="…………………….." name="email"/> </p>
User Name: <input type="……………………." name="uname"/>
<p> Password: <input type="………………………" name="pwd"/> </p>
[gf;. 3 Ig; ghu;f;f
AL/2022/20/T-II -3-
,g;gFjpapy;
<input type="…………………………" name="Submit" value="Submit"/> vjidAk;
vOJjy;
<input type="…………………………" name="Cancel" value="Cancel"/> MfhJ
</fieldset>
</form>
</body>
[3 marks]
(b)
(i) gpd;tUk; ml;ltizapYs;s tplaq;fisf; fUJf.
…………………………………………………………………………………………………
…………………………………………………………………………………………………
[2 marks]
…………………………………………………………………………………………………
[1 marks]
(c) gpd;tUk; PHP script ,idf; fUJf. gpd;tUk; gl;baypypUe;J njupT nra;tjdhy; ①
,ypUe;J ④ tiu jug;gl;l Kfg;gilahsq;fSf;fhf nghUj;jkhd nrhw;fis
vOJf.
if ($conn->②)
{
die("Connection failed: " . $conn->connect_error);
}
$sql = "UPDATE MyGuests SET lastname='Doe' WHERE id=2";
if ($conn->③($sql) === TRUE)
{
echo "④";
}
else
{
print "Error updating record: " . $conn->error;
}
$conn->close();
?>
[2 marks]
2.
(a) nrt;tfk; xd;wpdJ ePsk; kw;Wk; mfyk; Mfpatw;iw cs;sPL nra;J mjd;
gug;gsT kw;Wk; Rw;wsT Mfpatw;iw tUtpisTfshff; fhl;rpg;gLj;Jtjw;fhd
KOikg;gLj;jg;glhj gpd;tUk; gha;r;rw;Nfhl;Lg; glj;jpidf; fUJf. ePsk; kw;Wk;
mfyk; Mfpait G+r;rpak; my;yJ kiwg;ngWkjpfshf ,Uf;Fk;NghJ
gha;r;rw;Nfhl;Lg; glk; epw;fNtz;Lk;.
,y;iy
Mk;
KbT
[4 marks]
………………………………………………………………………………………………………
[2 marks]
❶ ex = conn.cursor()
❷ res = ex.fetchall()
for i in res:
print(i)
❸ ex.execute("SELECT * FROM employee")
❹ import mysql.connector
conn = mysql.connector.connect(host="localhost", user="root", password="admin",
database="myDB")
1………………………….. 2…………………………..
3………………………….. 4…………………………..
[2 marks]
3.
(a) fPNo jug;gl;l gl;baypypUe;J epuy; X ,w;Fupatw;iw epuy; Y ,y; vOJf.
[njhopDl;g ,ay;jfT> nghUshjhu ,ay;jfT> nra;gzp ,ay;jfT> r%f-fyhr;rhu
,ay;jfT> rl;l ,ay;jfT> fhyml;ltiz ,ay;jfT]
epuy; X epuy; Y
(i) Kiwikapid mgptpUj;jp nra;tjw;F (A)
Ntz;ba trjpfs; eilKiwapy; ……………………………………
cs;sjh? vd;gjid kjpg;gply;
(ii) xU nraw;wpl;lj;jpdJ (project) nryT (B)
gw;wpa mstPL ……………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
[2 marks]
[gf;. 7 Ig; ghu;f;f
AL/2022/20/T-II -7-
,g;gFjpapy;
(ii) xU tpepNahf fk;gdpapy;;> xt;nthU Xl;LeUk; (driver) ve;j thidAk; (van) vjidAk;
vOJjy;
nrYj;jyhk;>; xt;nthU thDk; ve;j Xl;LduhYk; nrYj;jg;glyhk;. gpd;tUk; MfhJ
juTj;js ml;ltiz xt;nthU thDk;> xt;nthU Xl;Leuhy; nrYj;jg;gLfpd;w
J}uj;ijg; gjpT nra;fpd;wJ.
(i)
(ii)
(iii)
(iv)
(v)
(vi)
[3 marks]
4.
(a) gpd;tUk; epiyikapidf; fUJf.
Ntiy tpguk;
4 cupikahsu;
Njitg;gLk;
nghUl;fSf;Ff; D2
nghUl;fs; Ntiy
fl;lisaplYk;> ⑦
Ntiyapidf;
njhlq;FjYk;
③
toq;fg;gl;l Ntiy njhlq;Fk; D3 ⑧
nghUl;fs; jpfjp
5 cupikahsu; Ntiy tpguk;
toq;fg;gl;l nghUl;fs;
nra;ag;gl;l
⑨ Ntiyf;Fupa D2 Ntiy
tpiyg;gl;baiyj; kjpg;gplg;gl;l
jahupj;jy; Ntiy+nghUl;fs;
NtiyapdJ
nryT gzf;
nfhLg;gdT D4 ④
⑩
thbf;ifahsu;
D1 thbf;ifahsu;
① …………………………………………………………………
② …………………………………………………………………
③ …………………………………………………………………
④ …………………………………………………………………
⑤ …………………………………………………………………
⑥ …………………………………………………………………
⑦ …………………………………………………………………
⑧ …………………………………………………………………
[gf;. 10 Ig; ghu;f;f
AL/2022/20/T-II -10-
,g;gFjpapy;
⑨ ………………………………………………………………… vjidAk;
vOJjy;
⑩ ………………………………………………………………… MfhJ
[5 marks]
gFjp B
ehd;F tpdhf;fSf;F khj;jpuk; tpil vOJf.
A
B
C
(a) NkNy jug;gl;l jUf;fr; Rw;wpdJ tUtpisT F ,w;fhd G+ypad; Nfhitapid vOJf.
(b) NkNy (a) y; ngwg;gl;l G+ypad; Nfhitf;fhd nka;al;ltizapid mikf;f.
(c) fhu;dh tupg;glj;jpidg; gad;gLj;jp F ,w;F Xu; RUf;fg;gl;l Nfhitapidg; ngWf.
(d) NAND jUf;f thapy;fis khj;jpuk; gad;gLj;jp F f;fhd Rw;wpidr; nraw;gLj;j xU
Rw;wpid tiuf.
[3+4+4+4=15 marks]
(6)
(a) 10110001 vDk; juT CLflj;jpd;NghJ kd;nr];lu; rkpf;iQ FwpKiwahf;fj;jpid
(manchester signal encoding) gpd;tUk; tupg;glj;jpy; tiue;J fhl;Lf (tupg;glj;jpid ckJ
tpilj;jhspy; gpujpnra;f).
1 0 1 1 0 0 0 1
cw;gj;jp 10 1
re;ijg;gLj;jy; 22 2
cw;gj;jp
re;ijg;gLj;jy;
[4+11=15 marks]
(7)
(a) BestFit vd;gJ ijj;j Milfis tpw;fpd;w Xu; tpahghukhFk;. jw;NghJ ehlshtpa uPjpapy;
fhzg;gLfpd;w jdJ 25 fpisfspD}lhf tpw;gidapid Nkw;nfhs;fpd;wJ.
,izaj;jsj;jpD}lhf thbf;ifahsu;fSf;F Milfis tpw;gjdhy; ghupastpyhd
ed;ikfisg; ngwKbAk; vd;gjid epWtdk; czu;e;J nfhs;fpd;wJ.
(i) Nkw;Fwpj;j gy;Kftu; Kiwikf;F Xu; vspjhf;fpa Kftu; tupg;glj;ij tiuf. cq;fs;
tupg;glj;jpy; cs;s vy;yh epiynghUs;fisAk; (entities) ngaupl;L> mtw;Wf;fpilNa
cs;s ,ilj;njhlu;GfisAk; njspthff; fhl;Lf.
[4+2+1=7 marks]
(8)
(a) gpd;tUk; epiyikapidf; fUJf.
cw;gj;jpahsu;fspdhy; (manufacturers) thfd cjpupg;ghfq;fs; jahupf;fg;gLfpd;wd. xU
cw;gj;jpahsu; xd;Wf;F Nkw;gl;l cjpupg;ghfq;fis cw;gj;jp nra;a KbAk;.
thbf;ifahsu;fs; cjpupg;ghfq;fSf;fhf fl;lisfisg; (orders) gpwg;gpf;f KbAk;. xU
thbf;ifahsu; xd;Wf;F Nkw;gl;l fl;lisfisg; gpwg;gpf;f KbAk;. thbf;ifahsu;fshy;
gpwg;gpf;fg;gLfpd;w fl;lisfspy; xd;Wf;F Nkw;gl;l cjpupg;ghfq;fs; fhzg;glKbtJld;>
xU Fwpg;gpl;l cjpupg;ghfkhdJ xd;Wf;F Nkw;gl;l fl;lisfspy; ,Uf;f KbAk;.
fl;lisahdJ thbf;ifahsupdJ ,Ug;gpy; jq;fpAs;sJ.
gpd;tUk; juTfs; xt;nthd;Wk; ,jw;fhff; fsQ;rpag;gLj;jg;gl Ntz;bAs;sd.
▪ cw;gj;jpahsu;fspd; ngau;fs; kw;Wk; Kftupfs; (KftupahdJ city, street Mfpatw;iwf;
nfhz;bUf;Fk;)
▪ cjpupg;ghfq;fspd; cjpupg;ghf ,yf;fk; kw;Wk; mJ gw;wpa tptuzk; (description)
▪ thbf;ifahsu;fspd; ,yf;fk; kw;Wk; ngau;
▪ fl;lisfspd; fl;lis ,yf;fk; (order number)
▪ xt;nthU fl;lisfSk; ntt;NtW mstpyjhd (quantity) cjpupg;ghfq;fisf;
nfhz;bUf;Fk;
jug;gl;l epiyikf;fhd ER tupg;glj;jpid tiuf. ahjhapDk; vLNfhs;fs;
gad;gLj;jg;gbd; mtw;iwj; njspthff; Fwpg;gpLf.
[6 marks]
(b) gpd;tUk; jutl;ltizahdJ Xu; epWtdj;jpdJ Copau;fs; (employees) njhlu;ghd
tpguq;fisf; fhl;Lfpd;wJ.
Employees
EmployeeNo DepartmentNo EmployeeName Department
1 101 Amith HR
2 102 Divya IT
3 101 Rama HR
(i) NkYs;s jutl;ltiz ve;j nrt;td; tbtpy; cs;sJ vd;gjid cupa fhuzj;Jld;
epahag;gLj;Jf.
(ii) NkYs;s jutl;ltizapid mLj;j nrt;td; tbtpwF khw;Wf. ml;ltizfis
mikg;G tbtpy; vOJf.
[2+3=5 marks]
(c) gpd;tUk; ‘Persons’ vDk; jutl;ltizapidf; fUJf.
PersonID FirstName LastName City
P001 John Joe Colombo
P002 Perera Silva Galle
P003 Jamuna Sivarasa Jaffna
P004 Hakeem Aslum Kandy
P005 Vimali Nathan Jaffna
[2+2=4 marks]
[gf;. 15 Ig; ghu;f;f
AL/2022/20/T-II -15-
(9)
(a) xU Fwpj;j vz;zpf;ifapyhd (N vd;f) ghlg;Gs;spfs; gadupdhy; cs;sPL nra;ag;gl;L>
mtw;wpy; 100 my;yJ 100 ,Yk; Fiwe;j Gs;spfs; khj;jpuk; fhl;rpg;gLj;jg;glNtz;Lk;.
,jw;fhd gha;r;rw;Nfhl;Lg;glj;jpid tiuf.
[6 marks]
(b) gpd;tUk; gha;r;rw;Nfhl;Lg; glj;jpidf; fUJf.
Muk;gk;
L vDk; gl;baypid
cs;sPL nra;f
S vDk; vz;zpid
cs;sPL nra;f
count = 0, j = 0,
N = gl;baypd; ePsk;
,y;iy Is
L[j] > S ?
Mk;
count = count + 1
j=j+1
Is Mk;
j<N?
,y;iy
KbT
(10)
(a)
(b) 0 njhlf;fk; 64K tiuAs;s 16 - gpw;Wf;fs; nfhz;l nka;epfu; Kftupfisg; (virtual addresses)
gad;gLj;jj;jf;f xU fzpdpapidf; fUJf. ,f; fzpdpapdJ ngsjpf epidtfj;jpdJ
gUkd; 32 KB MFk; vdTk;> xU gf;fj;jpdJ gUkd; 4 KB vdTk; nfhs;f.
(i) xU gf;f vz;zpidj; (page number) Njf;fp itg;gjw;F vj;jid gpw;Wf;fs; Njit?
(ii) xU rl;lf vz;zpidj; (frame number) Njf;fp itg;gjw;F vj;jid gpw;Wf;fs; Njit?
(iii) nka;epfu; epidtfj;jpdJ ngau;r;rp (offset) vj;jid gpw;Wf;fshFk;?
[2+2+2=6 marks]
[3+2=5 marks]
***
[KbT