Python 2022 Qp
Python 2022 Qp
?:02237a(t0a?l
f Mastimum Marks : 7A
P. T. O.
lzl 2022374s221 l3l 202237210221
l. Attempt any ,lra of the following : 2 x 1 = 14 (b) Exptain the use of break and eontinue statcment
sBf, s{sE\ I
print the factorial ofthat number.
(b) Explain dilferent input and output rnethods
available in PYhon. tm clflr{ fafu {it W1 d Er afm -*t'}, s*
hthoni scfu fu-t qd srA frh-{ trcge W number dflfl 4] variable i'ffitm of m'n" r*l
sErdSe methods of lTq{Ec t 'i
number iFI factorial fite tFi I
(c) Write a program to print sum of 1wo numbers
using script mode.
J. Attempt any flro of the following : 2 x' 7 '- 14
d gidi d d{ e} fife ovi d frs script mode i I
I
Attempt any rwo of ihe foUowing : 2 x 7 = 14 (a) t)xplain List data type hr Py'tiron. Degcribe thr:
ffidtud it ftF{t doi t'rr dfrc, rnethod of creating and updating the list with
t{l 20223?2(0221
l5l 2A?2r7210?21
(b) Write short notes on any ,v'r) of the following ? Dcscribe the
(b) Whut is user-defined function
built in functions available in python : with
method of declaring and calling a function
(i) cmp
suitable examPle'
(ii) range
User-defined function
qqf t ? gcgffi B-{fdcuf
(iii) round
frqftfufr pyhon * built in functions q{ dfe\'f, tt gC fuS n'nction ol declare {i[ cax 6-gi d
fuqftrfi ftfuc, shtqi ot qft dfucl
.:
(i) cmp
(c) Write a program to handle exception
'Division by
(ii) range
Zero' .
(iii) d
round
tfi c\'lm fafuc d 'Division by Zero'
(c) Write a program to print the length of entered
string using Tuple. handle 6t I
2022372(022) 73o