3 Hours / 70 Marks: Seat No
3 Hours / 70 Marks: Seat No
2.
[2]
d) Explain Local and Global variable. i) Add three students in above dictionary
ii) Update name = ‘Shreyas’ of ROLL NO = 2
e) Define class and object in python.
iii) Delete information of ROLL NO = 1
f) How to give single and multiline comment in python.
b) Explain decision making statements If - else, if - elif - else with
g) List different modes of opening file in python. example.
c) Explain use of format () method with example.
d) Explain building blocks of python.
e) Write a program illustrating use of user defined package in
python.
P.T.O.
22616 [3]
Marks
5. Attempt any TWO of the following: 12
a) Write the output of the following :
i) >>> a = [ 2, 5, 1, 3, 6, 9, 7 ]
>>> a [ 2 : 6 ] = [ 2, 4, 9, 0 ]
>>> print (a)
iii) >>> t1 = [ 3, 5, 6, 7 ]
>>> print ( t1 [2] )
>>> print ( t1 [–1] )
>>> print ( t1 [2 :] )
>>> print ( t1 [ : ] )