
Q5)
a)
b)
c)
Q6)
a)
b)
c)
Q7)
a)
b)
c)
QB) a)
b)
c)
Q9)
a)
b)
c)
QJO)a)
b)
c)
Write a Lambda function to check whether a number is positive or
negative.
(4]
.,
Explain
string immutability
with:an
example.
[5]
f
Explain slice operation
in
strings with
an
example. (5)
•
~
~
'OR
..
Define
the
chr {f~n~ti0tlj Ho,v
is
it
different from ord()? [4]
Develop a
pY~n
Pi-~~am that counts the number
of
vowels and
I
,,._
"'
'\
consonants
~a
given"string using
iteratiof1.
[5]
"-
'"
t\"')'
• •
Define function, explain function defination
and
function call with suitable
examCi~...,
/~
[5]
-P-,--:.,r
,·
~,;
/\
H<;,; can't~u check the current file position in a filr. (4)
~
~~
~~le
path? Differentiate between
absolute~
'and relative path.
(5)
Discuss
file
handling. List down the handling onetations with examples.[5]
...
....
.t')\.
"'
OR
,
~
~
',-
'~
What does the flush
()
method
d&.\lile.~dling.
[4]
Explain the difference betweeR9t')d ( ,J~tld readlines
()
methods. [5]
Discuss the purpose
of
file
~p\U~n
operations like renaming and
deleting.
~
0c
'-- [
5)
0
~\~
Describe the
conceyit~
d~
~bstration and encapsulation in object
• d
·"-)
' 4
onente programming. t~.
~]
How
do
the _init_( )
~n~f
del_( ) methods help
in
creating and
cl~g
up objects
in
python~")
Pt~
[SJ
Differentiate
betwe~
class & object with example.
~"',
I.:)
r;;s
[
5)
OR
°'
I
,~c.&t
What is polymorphism? Give two types
of
polym~m
in.,'06ject
oriented
programming.
~
rf
[4]
Discuss garbage collection in python.
Ho·-~s
i!dB')~age
memory for
r~~:
.~
objects?
.(~
, " [5]
Differentiate between public
and
priv~te
~mi4~'s
·with example. [ 5]
-,.~
'~
"-
\).'
~
~~I
...
.,
'
X
(6581)-2402
2