Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

1-hatis

tydhan Pysarowing ? Exploin the featuas


uses
ythompungarnming language.
ythan
Jevel, compi/ed Jental-puhpoe, dnanicaly ypead
and inlenpkeledjasbdga
inlerpefed kig
colleotd,
Hand putaly objedt ouuenlad pagsamain Lamguage hat
suppaktspedwlal ohjeok bisented andAackisnal

Eeatuse of python
Easy to useornd Sedd; PyHhon's synax ia elean
and eos to Juad, raaking t ideal lanfyage for
both beginnoà ond exputiencodpsragoansk.
, The Of vasabes aee
yamicaly ypd
dedes onined chuuing Jun-
dadabyes
tne. We do ot ned to
specify the datoype of a vastioble
Ppdes
levól Hgh -level lanqua meant hurman eoble
Code o

Com piled ond Inlepreted o Python code fiast gek


Carmpiled into byteepde, ornd then ntespseted line by
ine. bahe Whe We docon loCLd the fython in
We doWnlaad the deault
ouk systemM
Cpythan.
Tescher's Sipnature..
Da

Brat bage Collected Memosy allocaion ond da.


allo catten ake qutoot
da nat icpecikically zeed tà the Aermx
Pukely object-oiented t rehes to
as n obËoct, including nurmhsd and shinge,
Ckess plallos Compahbliyy Py thon Can he.
casily istalled on wndoos. mac0s, and
easious Linus distoibuhont, allbinp de velapua
to cote soltalate thatuns_as_dtÉetent
peatinggatea
Rich stondard Ubary Python cosnes with Several
stondad Gbavet hat Rlcovdeg seeody- to-se
bodves a9d Functons fos vesioed fases, Janging
ron web developmentnd dato onip Watio,
to nochine laatnin ond nelnloYking"
OPen sotce Pythos ePen -scuhce, cost-fyee
Seveal

Lseclaes 2nd -applicattones C

uses otEython
teld
Data Seencea'vagt H8ld
Dato Seience
qnd Pythor is0Poxtont lonnge for tus
feld be couse of s simobey ease of ond
|and avlobiby of Poerfelldat onaya s
visuali zahon coalies i wika. Nam Py, Pondas ond
Pege No.

Matp lotl%

Desk top Appieaton PyQt and


and1kinte, ate
usÉful tihatujes thal ean be, used in
CnUI -
Caaphical Uses lntufaca-based Dertop Applicatint
Thee ae hettee languap fo he iald, hut it can
be used ith ahak lanquages fox making
making Applicatòni.
Console - bosed DPpliation Pythonis also comDnly
Lused to ceat Comand-ne a con&o le chased
Lapelicetons because of is ease of wse cod syppat
fos adrane fealukas such a loyputputpt ssdisachor
dseckir
and pipin
Mobile Applieation tatlails Pythen s not eommanly.
used fo cleating nobila apeeations, it ca be s
be cambined ath fkaonDYk Like kiyy ox Beealase
to ceceate ceEs -patfoxm mobile orptalion
Softwatee Develep wment o Pyhon s consid
considr Dne of
the bast sofware inaking longaged. python
easily covIpetble wnth both ron Soet scale
lasge Scale softwase,

Atitiial alelgence i the


Technolagy and Pythons pefect lam~eaga
kos ahicd intelligence and macluhe loainjp
because
Sich Tenso Elow, kerat, nd Pylolch
Teachers Signature...
Pago Na
Data:

Eiance, Python Luas ¯bases Che


landas,sc leakn and stale Imbdele
inan cial mo deling Cnd
cnd analysits
Audù and Music Python has ibzahios (ik
Pyaudio, arhich is ued for audiopsus cossint
Synthes and anaysis., and Music2L wbi
1S used for usie analysis and qenaton
Writing Serips Python s used tor writing
wihng
Lderips to Automate tasks ke A
optaioni, web seepin and dala plnceti.
2. Explain with exampe of all conditoal
stale rnents inithon.
condihonal staternent in python
to tke de cision n ytmon.

Decsie making stetemenk culloos Jou. to Cent


)
executrcn ot cotein Pat of the Co de Pasted
on the outco ne ot the eondittoral at

Thee au foua Pes con dihonal ehteoen


eython. Thej Ce
rven bélow

staterment
) Nested it stadement.
ki) if elif edse
alse lodda Ghatenet
oSimple it statenent
Siyple it shate ne nt fist check +he conditon. T
Comdihon s tSew then twe shteoe nt blo ck
Ls exe Cutod ond then next stateme nt afles He
ciwple iE state ent is recuted If th con dio
is folse the tue steteent block is not executed
ond diecly next stetement afle si0) Ple i Statemen
execeted.

cenditonal expi
ctatement 1
Steulement2

statement N

aint infut ( Enter 1st value')


( b int(input ('Enle 2nd vlu'
f a>b
Rint(aeatesta)
Rint ('tukabat ='b)
() IE else state oent
E else conditional stafe o Prt s used to check
ch he
tue true
than towe slafemen blo ck is erecled. if the
Conditon is false than the lse stateert
Teacher's Signature.
blockiS executed o

it CondiHon
Statenent
stateent2

staterert n
else
steutement 1
state nent 2

stale ment N

m= int (input ('Ente a nurn An'))


Peunt ('Nurn bi S even')
else
Pnt ' NUb is odd')

( ) Nested if sfatenent
NCsted neans With in oshothe
Called
staterment
nastedi state ment.
Teacher's SignaturY.....
Syntox
chate ment 1
If CondHon 2
statement 2
else
statement2
else
state nenti

a= int Cinput (Ente 1st value)


b int (input(Ent 2nd value')
e= int (input(Entr 3d valuel)

Aint
else:
(yhalect =)' a)
print(jeakest =' )
else
psunt (1sectest =))

paint (ijsaakest =} b)
else

Teacthers Sigrature...
Pyo Na.
Data;

.eli se To ddes Statent s wsed whe


be ohe ckod .
multi ple e0ndi tion huse to be Python.
tst conditio oe is che cked if condit0n 1 true
thop tup statosnent blo ck is ereclited . It condi-ian
13 checked
bne is Fose hon conditHD 2

£ Cendho 2 tee thon tvo stotement blot


condiHon
s executed. if condion 2 is folse thon
3 is checked.

|This PD ceSS s checki ng cond Hon s epeeted unit


f al Con diHo
n 0on diHon evalvate & true.
specifyif gnd i else i£ evaluates to false
hand toaul Gttenen! 6lo ct assO Hate d with

Syntar:

staterent 1
elf condi Hon 2
stateonent2
elif cap diton N!
c(se

Teacher's Signature..........*.
velles
2nd
tueton
and
he
be
ents
Posihonal to
ie
ert
on need
hlhen
qlphabet') Default
agufunetio
Tea
Slgn
agu
by
voel'}
the nents rst
agu
those
in Called,
asqunent
Psint voel)
(epint of be
('vowel') (vowel')
pint (vowel')
Peint Mot ents St
('vo
Punt
wel) ale
ent
agu
asgument
Positional
('Ert exap
aunet,
(
peint 7n ayu theed
Cal et
funiomis
elit
ch==t second
lhe
PosiH0
input with
Asbiteasy to ayu

= elit
clse Keyword
Expan Positional he
hen
irst
ch
he

8.
lwes,
onert
ahgy
using
aecalled
kunckioza

Cousle) 'MeA)
ache
Sign
Na,
Page
:Data CoLle
Quoll,
1oll)
nome) posian
kegillt
name9oll ohtails'
l'stadent
Arintiol,) Rane&h
Name
Roll(eousse
Aunt (Ramesh, MCA cUTunent
by nugbes
C'pint
NOe anquonent
Keybekd cess
hss.dise
Rl0
2 the
diplay
del
LBydeCpasiticnal
fault dspleyput
Dut cHon
koyord
fun
by

to znaltes
matctAhile
Pass.
A
e
the
as
slhkiatae
atqunent
ayuiid 'Rowses5',
coSe
=MCA' velue
ny at deteult
detith.aof
dehalt
nent
umb au
Pge
Ho
valuu the Sign
Teac

han0e ay
that tis
roll,
cose functton agynent
funcho.
Coutse) wit to to
Can
) vaeDue
xol! delail:
(istudent
Puint
NOmt
a10), Ramesh
diplaylall functon, funcHon
ment
atqu
se:" ot detaut call
P'Namme tane
(nome
o'sply(Rol
('Cous
Punt to/.
do funhon
pass
not
then
agumet the
a
ophom
becam
detine
20ent.he
Rsunt Roll Coso
Qutput Defoult at he
opdate of
del 2u
e a%
Lunekio) ion abitakay
nt
do fyncto)
oide Me n
fu
')°
the
suiation
wwhe t Sign
Teac
Paga
Na. dusing MCA calld
ae
BCA) the
ahgyanent
i toa y
value Coue, ocnt
agusmernt couse) lol)/0), fo
ToU) nuded
detoult roll, layRamesh
disp wtucquroent
Asbitsay
ajumeant
oftyPes
Cso27csh
functorn
valíable
long
th
defnihon
#funetion= =)
(oame, mulliple
These
oNert
detaul! Norme('Ro)
he
otyde afu
dplay
(
Pint
PAint
caligplay python,
da pass ment.
gu Df
he ySe ddvan
Ce
umbe
def In to Such
to
ou belou standasd
of
that
engble ae
descbing
exeeptione. the
numhs

given
a
the list
ae whe Teac
Signa

wlt-in in zaithout povide


funchioa Psovide
fsoBo
This belonl
iven
excepibnsiale
hse occwo
thoa3),
exceotons,
cepior
Ex b
Excepion
Built-in
Pythen on
ae) iye Pyth I
=S)
('surm
pint build exceptonS
but be
20) these
ags: the exceptonScan
ens 1o, Built-in Eysa e
avs? mans
has
Python standasad zby 0
4,8, of ontput
(Eleon that
(* Divisib
in (2,
suM i Comwonexcepkions
SUM ple
exavn he
def
PBurnt
fos yowhat zescDdivided
gixe bild
)
1n
Correot

glebal. eso)
Sig
Te
JAhend
QCCus iide
Oba: ) valuu')) bound
)
vaue'
eannt
a 2nd E o ='e) (Diisio
Pnt of
local dst
Ents Nuanhes out
Yen. Exceptio
Zndex
Eos
(Erte VISIO) dex
307
20,
=LiD,
be intlinputl' on
may Jt. fails
(vI0
Ee intliput zeDDI
Pintl
inde found
ntahon
is e(4)
Plint
it Elenbt-
not
does Excepton
b= lse
found else
a
is
ine.

a
eceds esn'
input
Fro
ioto do passpocla
Deto:/ Sign
Tea
and
:Pyhoy t dito
'nput
t val)
Velue?
alsone
n con ertued: Pyhon
to
used a
ollong t Ente nent h
etkeywosd the date, You g
Functho
input
la) for ( b) stateThethou
sfatement
Pass
dicHonay
a) fynchon
input rug
Funcho
Jnput input
( Pass
the sBate mptsadi
Psunt
sinark,
nt.
lstateme
qlobal
5:Exp/ain
Poss po
=
val pass Syntax
Atte The these
b) ) It a
'placehbl to
US
def Local
aahle toWant
is atuable
vaiable ae
funcHon
8atérnen}key
be q
for
hoValue
can wsed
when
poks allows
te
ord Use global hav Te
Sig
a,
Pg keyialosd wle
eoched iS
seopes deseine
outside kuncho
poss is any o6d
ss'
==Pa
value
glabaly Khglobal
tuncon ate ttee u
Python, Not te ky
|e)
qlobal
keyod alobal sall
keyword the
(' key cuKen side
Rint dekadt.detoult.
by beloutside
qlobal
Python any wlosd n glo
-} Li)
without
the )Valuoble
plse vaible
the Rales
of
side
globalVaue decwe
guence
outide
in
Se ()
i
Can
deelaa
be ordesike
eallerhan a ae
awhse
ky
hold
Hoat in
walua de
ato
pais Pai
eliaentialus Teac
Sign
Pae
No.
dee
deta Value
tyPe
(a=lab=b
pint
ath)
(sun
peint
Yalues Cn stose ky
ky oy
a
Line bz20 Suki(ab) to
pytthem hy
b20
Ea
holda
CL
isepso
=30
Su) sed value
single opkimize
def
s_m in
a=10; a-0 walud,
diionaky dieHonay
alobal utput
o dione
d)

daka Leach
A LA
aiga
aichiomay
teen' Inilially
enpl
dictiomaky
No
Peo
by
Deto:|
G
wiHain
csuaked 'G: emp
=?1$'R':Red' hally
Rani!
elnenk
be ni
can
pakyof lor= Rind
i-oukput
Seguence co
diti
A

You might also like