0% found this document useful (0 votes)
3 views19 pages

Python Programming Question Bank PDF

The document appears to be a collection of Python programming examples and explanations, covering various topics such as data types, functions, and control structures. It includes code snippets, comments, and outputs to illustrate how Python works. The content is fragmented and contains numerous typographical errors, making it challenging to follow.

Uploaded by

sudhirwadekar786
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views19 pages

Python Programming Question Bank PDF

The document appears to be a collection of Python programming examples and explanations, covering various topics such as data types, functions, and control structures. It includes code snippets, comments, and outputs to illustrate how Python works. The content is fragmented and contains numerous typographical errors, making it challenging to follow.

Uploaded by

sudhirwadekar786
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PageNo.

Date
Queotian Bank

2 maako gueotian.

LEniotPyttan featunao
-The cade io Rn ln y line
Tatenanked
Oniented- ike athuzgenazal upaoe
olieet languago,
ythanio [Link]
anjentedanguage.
-Bytran inplatftam
sathanmTrdepudeit indeundark
Like we can Rnthe oame cade in
latfanmo
dibAanant wthautanytharg
- kuu canacaally
2achile oitat a Kyhon peamytdnd
an
intenact theinteapstez dinacyte conite

pgroms.
2otcomaaibonanatonoin Pythan.

Onenataz Nome Excounnle


Eoual
Nategual
Guncaten than 2
Lenn than
Gtnoattethan
ae

< equalte

legusl
en i-aa
intGinput("Enten a

baint b:)
(innut"Enken
punt abiab)
aniit a !eb:alb
Casbi
fnant
a sb
pnint a<h:,a<h)
PageNo.
Date

aint(azbi
,aab)
nnunt a<ehiaib)
b Enten ai3
Enten bi3

aleb:Faloe
a>b:faloe
a<bifaloe
abi Trle

3DeacaiheTlesin bythano andenedand nchangeahk


which
a callecisn
toTunleia
dunlcatemenlura
|Alla)D 2awnd i2ackats.
-n ane
Pythan tules
Once a tulé
cziten
totth
Caunatchangeito value
o caaated,yau

i-tuyle= l'aynle"banana
Example "dheny,2)
puintChyale
baana,
(Coyle,
Oututi- 'chunny2)
4Deocaile
indertation
in ython
ike
the pncgramunqlanguages C.c+,
Tawa

-A cade and endo aiththefaot


ask otasto bith indenatiaa [Link]
ineThe
amaunta tana outitmuat be
tian
inderntoa
thaaughauc hat
canizkent black. Back
2
Block
Blecka

Bleckcontirten
Bockcondinuctian
TajeNo
Date

GlElain gdenti
emtanohnond arunalans
in Pythan
Opanddaz
Memiezohin

Chualan Dencaiakan. Exanple


in Retuens
Taue iha sequence.
oiththe onuihkdyaue is
tnnenentn
the

notin ihaseqyencely
RetusnTnue natin Y

isnat pnanentin theayjed

Examale i az ,2,3,4
nint(o)
2

Q 2

(3 not ina)
aint
Opuate'
Tdenlily

pazatae Deocailian. Eatangle


Rotuuznozueifbath

lalyject

Tneifbolh.
Rekusro

alyed
Examylei
be abc
puundCa iob)
OtnutLhue
io nat

b:abc
naintla natb)
Ounutfalbe
6.|Waite
dauuatheouputaf the hallaoing
S) indcen Rythancade
=lzeno,One,
two,hyesfaunfive'

+>> [:
indices
utut- one,[zeno aoa,hnat'
i inciceo-2]
Outnuti-lzeno,on
Date

ZDescaleNElinecomentin ythan.
+Nin cammant
Thnes oingle an daule
guatesase as [Link].
that

inte code

Thio inaack
ah Cade that yau uwant ta Camentaut
Aaint ("Hella
Wanld
yarint("Caadyg
int("Hella
BDescaie
Keuoond "cantinue""
uoitheLample.
witn te antinneotalermant e can otanthecuneent
itenatanand caninue otn the. neet.

haite a Bythan nnagamhat nnint allthe numuss

obile iK:
Cantinue
(i,
pait endz
PageNo.
Dute

lateandiotand
4Dianeniate Tuyle.

Liata Tuple
a
Liotin callechian
ohich
[Link] ule
whichTunlein a callachian
us [Link]
[Link]
andened
[Link]
2hiat Tuplesane iziten
Jbeacketa
hasagiana.
uorth2aund uackats

|Cnce iot in cneated, |Once


tuyleuiscoated.
ya chanq.
can change ito waluo-4auannah
Saues
slightly
Gienenally olauieeGerenally
dightly
haatez
ue kaužaiy |cue
te imtao:ly

5Hao more methodo Hao feuwen methodb.


-t,2,3]Examle
Exomple lat itp
sii2.)
[Link] fallauning'
12
|22
|2 3

fazi
in nge,s):
nange
-"
nintG,nd
Anunt ()
No.
upe

Date

4 astien

A B
1
a=3.
b=2
aXb) 010 #

) DR

A B

- a=3
b=2 O10
ab)
QHnt ("alb # 011
ageNo.
Date

XOR

00
b=2

NOT oxotan Co)

- =15 # A =0011
# ~A= 1H00
TugeMo.

Date

Q=3

o04100toc

=0
Puge No.|
Date

ne

=
leters
tacanmplo- ['a,'6,
c)
C'd)
[Link]
PHt Cleters
Qufput:Ca6,'c','d'

onsthowat

CIia)
[Link]
pri Ci1)

) Snsort
ate

amplu

ipopC)
lipop(1)
pHct I)
Oatput- ['a,6,c','a

phat CI)
ate

Nmi 20

uma = 60

Rum 10
,num2,umy
allNum=umi um

pht(AILNunbêrs allNum

and Aumi numk):

ell£ Caumanum3):
eif Aum3 > num4):
(Num3 is
prit Qreafe")
else
piat(Nun4 is geata )
PugeNo.
Date

X=1
y=354

pit pe. C)
Autput- <classiot
K closs int

((slo
Hlant-tlont u

docinals
txomale
badX=10to
y=1.0101

pit
CypeC9)

utaut-< cassfloat
<dossfoat'

Ssonpla.
X= 3+ 5

phat Chype ()
Qupit-<casścomplex
<classcomplex>
PageNo.
Date

At = tuplec)

))
Huple
o
a=pt
(" ent ")
elements

ta=typle
m= it Ciaput (4Total qumbek of values inx second

tor iinronqeCm)( ente olaments )


iaput
ta=ta Ca,)
t+

QHat ("BeforeSuoappiaq)
pHnt (FirstTuple enb
piat ( 5econd Tuple,ta)

t1,t2=t2,ti inn
pict Ato bosgpiag
pHt CFirstTuple"
pint(4 6econd Tudle"+a)
PageNo.
Date

Total num bee of voues


1:
i frst tugle 3
enter elemerts
enter elements2
enter elemmerts 3
Totad umber of vaues Gecond pk 3

enter elements 4

6a
enter elemerts
ente elemercs
Before 5apping
Firet Tuple. ( 203
Geoond Tuple ('4 '56)
Aer
Arst 56)
Swagpin
Tuple,
i 2)3)nt 9pls
Second Tuple

Striag= input
if sting
(":-1]):
Shiag)
Ente-
Ghing o8

else: KA
tpt Eter Ghingt MAM
pandrone
The Gtag a
lsceA
uspaiatthe
Bocanala- a= 30
pinat ")
(yes
else:

uput no -
6

Q 30

elf
pict ("aqreate")
Citeyual")

asput
PageNo.
Date

10

>>> a=I2,5,1,3,6,9,+J

Autat-L2,5,2,4,9,0,1J

Python")

2> pHAt (t1-1])


pHnt H [2:])

5, 6,1]
IA3,
[
Stpt- ,42, h',
,2,31J
"hello",

phatci)
piatClioJ)
pHtCh)
['p,o',
Qutput- b',',e,'
M

3)lice
the alicingsanktero"
Cucslen)
TugeNo
Tate

i|p),'p),0,6,[,'
pia C3to end,
I[3])
pHt 3:Upto

:E:) )

-5:-1J)
AHnt C-5 to end 5:J)
puint (all

C)
piat

6
4o6,'en

You might also like