Cs Record Python
Cs Record Python
Page No.
Date
AIM
CA psqaam to Implinent auithmetíc alalala
sng Bundina
PROGRAM
de add Ca b):
Stin a +h
de sub (ab):
otisn a-b
dq mul (a,b):
ouu a h
dey div (a,b):
oln alb
del
olunn alb
de mod (a, bi
de tapla,b
a
#main
to
pxint (add Ca )
eli op = : :
prnt (sub (a, b))
Enten an oaoaten :
AIM
to chak whethen a
numben is Axmstrong OY
PROGRAM
man
(Toputaten a numben : )
|Dum = fnt
Numben )
puat wm,is an amsaong
CUkmylson DumbenJ
pnt (num,'i ot a
RESULT Aucceshully
The
OUTANT
inten a numben 1
1 an armstong numben
AIM
dalned undion to Qcept a t and
hall the Numbeny. and dauble the odd numhery
ROGRAM
de Aunll):
aun
RESDLT
The psogaam i ex lded Buceslully
OUTPUT
AM
C
dolined undkia to CDat the
numbenA and odd Dmbend
PROKRAM
de funcl):
Aor in tange (o let )
even Cont t 1
Oddcount t= 1
caunt:oddiouat,nevenowt ;' eeniuot)
punt ('odd
man
)
no o element
k: fnt (inpt( Eaten the
(Enten lement'))
V fnt (inpt
a. apped()
put ist ecied:a
element : 4
Enten the no. o!
énten ?lement : 1
tntes tlement : &
En ten flement 3
inter Element : 4
Iist sucieved : 1,2, 3, 4
even ount a
Page No.
AIM
usite INDEXLIST (L), uhon L
clsments passd the Auntion the
list amed indoz ta
lit that
yaluvns anothen
Flemerts
Atures the indias ob
PROGRAM
ipdez_lst=]
fox i in stange lo, anl2)):
index list. append [I
psat indax likt: inde-lit)
maun
RESULT
Ihe paoqiam exeutal Aucesf uly
TC
OUTPUT
de, shaw():
( open Cmyfile tat')
data = suado
low = O
digit = o
Vaulat : 'A','E'ol
in data :
in Vowlist :
Vowels t 1
else:
p+=1
ple :
low t= 1
if Lsdigit02
ExptNo Page No.
Date
fedsel)
Ahaw)
RESULT
Jhe caeuted AUces<ully
day then uno agaun lome
way go ain Rain
.tzt bile My
iodigit Number
Numben
Cas
a uppen
Numben
|7lonsonent Number
d
16Vowels
i Numben
buTPUT
Page No.
Ext Nc.
Date
AM
toead a ttat 7ile sample. tat and
Cunt and cluplay the Nunben
COunt to epuated)
be
PROGRAM
de Count AJ )
uib open sample tzt) as li
i line ol.ppen):='A':
lountA += 1
phnt (line. AbRip O)
eli ine lo1.uppn() =='I':
(punt. T t=1
ount AI:Count_A-TO
Jinea Atasbing uib A
:lountAI O1)
lountAT [11)
RESULT
The
OuTAUT
sample.txt
AI Tndians my byothad and sistery
1 love my lounty
AIM the that
to tomove
Waite
and
lwih ?t to
ontans the chaacten'a' in aa file
anothen 7ile
PROGRAM
del apydata()i
Bi openlCSounetzt)
B2 openlC destinationht',u')
data = k oadliaa ()
Lox line ia data i
A'not in lne anda' not in lne :
6
l2 seeklo)
data 2 l2 aadlo)
psint (data2)
fl. close)
l2.close)
main
Copydota
RESULT
Jhe pHogram AKçasfully
OUTPUT
Hello wosld
thes 8 python
Sona t t
Hello world
Thu Python
a
pogramming Larngoge
AlM by Ine and duplay each
Read a textile ne.
wod sepexated by- a
PROaRAM
R= cpeolmyfile tat)
Wordy = isplit)
Box a în word:
print (a44)
lclose
RESULT
The pqaam is ereutalAUCCesluly
OUT PUT
hello +
world #
Py thon #
myßie.tzt
hello world python
Page No.
Date
AIM
a bioasy tle uitth
uih name aund Qmben
inpaxt ptckle
le ogen (Binazy fle.dat 'wb+)
de, Înput data)i
while
: fntlinput ('Eaten the
name : input(Eaten the name:)
mek = int (input ('nten the mask : )
Lst. append ([vno, namemank)
înpt ( To ontinue pss Y elseN0
except i
break
fox io data
Aaund
punt ('Rollng fauad=ol,'name- uc l,nak
Hec27)
break
foclael)
nputdota ()
eand data)
OUTPUT
Enten Roll n0 1
Enten Name
Enten maks 500
To Continve , poes y, else N : N
Enten Holl 0: 1
Roll no. found 1 Name XYz Masks = S00
Expt No. Page No.
Date:
AIM
a to update Stulent Aorend
Tmpozt pr<kle.
de date Hucend ():
Cile open(' binasyfle.dat' 'xb+)
fntinput( Enten ol) o o student to be pdated: )
wbile Tue i
bseak
kox ? in rang (lonl dota):
mak = fnt (iaput (Centen the mask to uplate :'))
data[ 2 mank
pant CoLerd updeted')
break