T
Ft2024t7482 Total Pages : 4'
Third Semester
Computer Science & Engineering/IT
Scheme OCBC July 2022
SCRIPTING LAI\GUAGES
Time: Three llours Moximum Marks : 70
Note :! Attemptbalsxquestions. QuestionNo. 1 (Objective type) is
compulsory. From tlre remaining questions attempt anyrtve.
gc{ t : saq Ed fiftqt saq inq'i6' 1 (q-{dfrE s-fi1 mT)
GTFrqd tr elq qadi d t A-6. q?E s) n-a 6frsr
D In case of any doubt or dispute, the English version question
should be treated as final.
ffi fr q-nx fi nir eierqr ft-qrq fr fufr d oif$ qrqr b
qaq o\ eiftq qrqT [Link]
, 1. Choose the correct answer. 2 each
rr& soq cn-r qqq fifrqt
. D Inwhichlanguage isPl,thonwritten.
(a) English O) PHP
(c) C (d) Alloftheabove
wqef{ frrq' qTqr { ft-sr qqr t
(er)gfru (q) PHP 4r
(c) C (q) [Link] qE1
0 IsPythoncasesensitivewhendealingwithidentifiers?
(a) No
(b) Yes
(c) machine dependent
(d) none ofthe mentioned
T{I identifiers t ftq-ci e +ffi ql{rem hv rtacnqfla g,
(sr)c-S (qt d
($) qeft{ Et}c (q) Eq.i * d{ rS
El2A24/7182 PT.A.
t-
tzl
uD Which ofthe following special variable represents current file
name?
frqfrrfu-a if t'ot{ HI fra}q qr rdqn sr{d qFI *1ffiftftre
m-rar tr
(a) FILE (b)
-FILE-
(c) File (d) None ofthe above
iv) Which ofthe following operator encloses a sting with-in single
quotes?
Frafufud C t ot{ sr sfrtfl ftqd ot$T S'wre{ gr R'T
66q zn{dr tr
(a) q{ } (b) qqt }
(c) qx{ } (d) enclose{ }
v) What will be the value ofthe following expression?
Fraftfuo q0wfr ir-r qFI Tqr &n?
4+3%5
(a) 7 (b) 2
(c) 4 (d) 1
a
2. a) HowtowriteSingle-LineCommentsinPython? 2
[Link] it ft'ra-areq o{d itQ ftrdia 4r
b) Write Perl Sfiing Operators w"ith syntax and example. 4
[Link] dr sqr{rq * qrq q-d Rrr qtTW ftr€it
c) Write features ofPerl. 6
qot fi freW ftfuqr
3. a) SyntaxforDeclaralionalistinpython.
Write 2
qFreFT tt q6 qft ft dqw b ftN 86ry ftrdt
b) Explainvarious Datatypes usedin Scripting language. 4
ffiT qrql if ugm frfr--x glel q-fiRi fr tqrsr otr
Ft202417482 Contd.....
T
t3l
c) Howto create dictionary and access values from it? Explain with
example 6
Dictionary +r* er( ok sfl-S Values ftF. A* rgne g-qrf,{ur
q-Rd qrflslt
4. a) Howtodeclarevariables?Giveexample. 2
nR'qd fi+ dfrd otz vq6q 41
b) Explain ifand if-erse statement with synta< and examfle. 4
fr*cq. efu sqT-{rq } qrQr if Grk itelse r}c+c o} eTfl-{qr
c) Explainthefollowingloopcontolstucture: 6
ffifud ry ftzixr $rf,{r fi qpsil qii,
D Breakstatement
D Continuestatement
5. a) [Link]? z
. qm'+rqm rqr ta
b) WriteanyfourffionBuilrin-Functionswithryntax. 4
fr&cg b wrq oH qrt qrrrQF fte-{{ q,EeFs full
c) How to define and call a [Link] e4plainwith suitable example?
ffi4rtm s) d* qfuilBo 6t Gft 6id 6t,
b'mE €qsir{gl "-* #
6. a) WhatisFilehandling? 2
wEa tsfrq rqr t?
b) Writeaprogramcodeforwritingmode. 4
Writing +s il fu fp qtnq ots ftrdr
c) Write Syntax for opening, reading and closing the file. 6
q;rE-a of raH, [Link]
di EiE fr-{i * frq futw ftrdr
F/2A24/7482 PT,A.
t4l
7. a) WhatisPatternmatching? 2
te{ ft-drE Tqr t?
b) HowtocreateaRegularExpressionexplainwithexample. 4
tga.q rfinar{ &li e-r-N B-qlilioT r+R-o eqETIEqr
c) Write uses ofRegEx Functions.
[Link] & sqqlrr fuir
8. a) WhatiscPANinPerl? , 2
q-d if cpaN Tqr t?
b) What is an Array? How to create and access values from an
all,lay? 4
y6 Anay qqr t? ffi Anay fr qrq tr$ e-rTq Ss s{ f,-m &t
v$a
c) Write shortnotes on:
$s q-{ $ftiq +qiT fuir
! Web2py
u) DJango
-+F{Fe€-
Fi2,024i7482