You are on page 1of 2

S

NO
TI
TLE DATE T.SI
GNATURE

Wr
it
eapy
thonpr
ogr
am t
ocountt
henumberoft
imesachar
act
eroccur
s
i
nthegi
venst
ri
ng.
1. 7-
10-
2020

Wr
it
eapy
thonpr
ogr
am whi
chr
epl
acesal
lvowel
sint
hest
ri
ngwi
th‘
*’
. 10-
10-
2020
2.

3.
Wr
it
eapy
thonpr
ogr
am whi
chrever
sesast
ri
ngandst
orest
her
ever
sed 12-
10-
2020
str
ingi
nanewstri
ng.

Wri
teaprogr am that:
(a)=pr omptt heuserf orast r
ing.(
b)=extractthe
enti
redi
gitfrom thestring.(c)=ift
her earedigits:(i
)=sum thecol l
ected
digi
tst
ogether .(
ii
)=pr i
ntout :(
1)=t heorigi
nal str
ing(2)=thedigi
t s(3)=
thesum ofthedi git
s(d)iftherearenodi git
s: Pri
nttheori
ginalst
ringand
4. message“ hasnodi git”.
13-
10-
2020

Writ
eapr ogr
am thatdoest hefol
lowing:(
i)Taket woinput
s:thef i
rst
,an
i
ntegerandthesecond, astri
ng(ii
)=f r
om theinputstri
ngextractall
the
digit
sintheordertheyoccurred,fr
om thestri
ng.(a)=i
fnodigitsoccur,
settheextr
acteddigitt
o0.( i
i
i)=addt heintegeri
nputanddi gi
ts
5. extr
actedfrom thestr
ingtogetherasinteger

14-
10-
2020

Wr
it
eapr
ogr
am t
oconv
ertgi
vennumberint
oequiv
alentr
omannumber
6. (
stor
eit
svalueasstr
ing)
. 19-
10-
2020

Wri
teapr
ogram thataskstheuserforastr
ing(
onl
ysingl
espace
7. bet
weenwords)andr et
urnsanesti
mat eofhowmanywordsarei
n
thestr
ing.(Hint
.Countnumberofspaces)
.
20-
10-
2020
Wr
it
eapr
ogr
am t
hati
nput
sal i
neoftextandpr
int
soutt
hecountof
v
owelsinit
.
8. 21-
10-
2020

Wr
it
eapr
ogr
am t
oinputal
ineoft
extandpri
ntt
hebi
ggestwor
d
(l
engt
hwise)fr
om i
t.
9. 26-
10-
2020

10. Wr
it
eapr
ogr
am t
oinputal
i
neoftextandcreat
eanewl i
neoft
ext
wher
eeachwordofi
nputli
neisrev
ersed. 27-
10-
2020

You might also like