Python Record
Python Record
Aim:
To find the Sum two numlbens USing pytn
ALUORITHM:
PSEUDOLODE
WRITE C
STOP
PRURAM:
Staeet
/Read the Value cß a,b
pint Valua o
Stop
RESDLT
UTPUT
Numb 20
Ento Ne
= 3D
Ertex #h numb
numb S 5D
The Sum twb
EVEN OR ODD NuMBER
Aim
OM Odd
T0 find whatR A the iven numb Van
USing Python
ALORITHM
Stnp 3
Even numben )
St@p PHINt C
else
( Odd numb")
Step 3.2 :
pint
Stop the pHog1am
Step
PSEU DO CoDE
a
READ the hum bat
0 THEN
a-2
IF
WRITE Even numbi
ELSE
WATE Odd num bn
END
STOP
FLOWCHRRT
Stat
a
Read the Value o5
YES
NO if af2==o
Stop
PROCRAM:
ta-a =0:
pint Even numbe ")
RESULT:
Thus tha pHDgHam to find whe the t
givan
umb en O4 odd hou bRan wittan aund
ixatod Sucassfully.
oUTPUT
numbe:41
Ent the
Odd nuwnbe
LEAP YEAR OR o T
Aim:
1o find whsth he given
ot uSing Python
ALIORITHM:
Stat ta pAogam
Stap
Step 2 Read Value 59
o
Step 3: f yH
pAint laap yea ")
Step 3-1
else
3-2 : pAint ( Not a Leap yaax")
Step
Stop tPu pADgHam
Stap
PSEUDDLODE
tha num ben y
RE AD
FLOWCHART:
Staet
yES
Stop
PROMRAM:
4 i t tinput ("Ent a yaa:"))
RESULT
to find whethe
Thus pucgHamn
0 not has ben wuttan and
yas is Leap
9iven
exatnd SuLLAstully
OUTPUT
2004
Et a yga
Rap yQan
GtREATEST OF THREE NUMB ERS
Aim
To find t gmaatnst th numbous Using
Python
ALHORITHM
STEP 1 Statt
STEP 2: Read ab,c
u the umbesu
STEP 3: If a>b and c ,thn duplay a geatest
gmotst numba
STEP A ElSE if b>a,c duplay b ú tha
numbex
STEP 5: ELSE diplay u the 9 Hatust
STEP b: Stop
PSEUDO CODE
START
G1ET ab,l
IF 0sb AD aS c THEN
DISPLAY a the g0atust
b>a AND b>C THEN
ELSE IF
DISPLAY b tha Haatst
ELSE
DiSPLAYCu t e gHaata
ENDIF
STOP
FLONCHART
Staxt
Raad a,b.t
Y ES
abardc NO
int
YES baadc
Pirtb
PRDIRAM:
numbu " , t)
paint (" The gecatest
RESULT
PAOgHam find + gatast of
Thus
lumbi
wsutten and x Rutad Succasssuly
OUTPOT:
numbæn: 4
Erta fst
nmbM 5
Ete secpnd
numban: 6
Ente t i d
th g a t s t rumbaæt
Aim
factoia f n USing python
To find th
LGHORITHM:
STEP Stat t pHOgHam
STEP 2 Raad the numbe n
PSEUDD cODE
BE&IN
CET
Set i1 fact=i
WHILE Ci+n)
fact tat * i
iIt
END WHILE
D1SPLAY fact
END
HAR
Stavt
Rodn
ilfact
while
NO
Bent fact
fadfadi
ii+
StoP
PROC1RAM:
n: int linput (" Enton a numbe "))
i=
faur
while (tn):
fact fat *i
i i+1
pait ( Te factoual of."a, " is" , fact )
RESULT
Thus pOgHam to find u fadoual
wwttn and yautad Success fully
OUTPUT
a number : 5
Enton