0% found this document useful (0 votes)
47 views4 pages

List

List

Uploaded by

Surisetty Manju
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)
47 views4 pages

List

List

Uploaded by

Surisetty Manju
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
You are on page 1/ 4

ARE

IARE
INSTITUTE OF Dundigal, Hyderabad-500 043
AERONAUTICAL ENGINEERING Ph:8886234501, 8886234502
iare.ac.in

LABORATORY WORK SHEET


Date:.32/22 ****'**

Roll
No:.2.2.1S.66 5Name:...Maniula. *********°****''***
ExpNo:.3 ****
.. Experiment Name: ..STS * * ************* *** * * * * * *

DAY TO DAY
EVALUATION:
Algorithm Source Code
Program Execution
Preparation
Performance in the Lab Calculations and Results and Error Viva Total
Max. Marks 4
Graphs Analysis
4
20
Obtained

T216
SignatureLab 1/C
$TART WRITING FROM HERE:

1AlM: Reod a lut nubens and potint the


potin the
numbens aivisi ble by
x, but not by y
ASSume X= 4, V= 5)
SoURCE CODE:
n int input C" nte a umbe: "))

Ltst1=[1
o tin ange (n):
rhem i n t Cinptu C"Enen any numbut: "))
sl.append Cikm)
Pint (" List dementu an: ", ist1)
int i t glements div/'sibe
by 4 bu nof 5 ane:

tol else in üt:


i ele 4- == O ard ele
/, 5I=o):
Psint (ele, end U ")
OUTPOT
Enten a numbea : b
Enhe any numbeN 12
b3
Enien 'Cany numbe
67
t e y any numben
a n y numbe): 2
Ghen any rumben: 6
sr elemeits a [ o , 5 3 , 67,21,16]|

selarment divisibk but not 5 aYe : (2,1C

m R a d a tis o numbes and u n t he

oSum d d intge Ep Even inkges om


th io
14, G3], odd numbe Sum lom
Sum Io
fE: [23,10,15,
even umben uma24|

S0ORCE CoDE:. 1

a numbe:"D)
n int input(" Enhen

1 i ange (n)
any rumbei
))
tem in Cinput ("Enlen
itt.append Citem)

OdSum = o

even um =\O
4 ele in E1

Cele .2 ==o)
evenum = ele

else
oddSum+= cle
1 e v e nS m )
unt "Even numbou Sum =

punt C"odd u m b s Sum


oddS S um
OUTPUT
Entui a lumbei:
n n any Numbe13
Enten any Num boi: 6

numbtt; $
l e s any

m a Cny numb: 5

numbu : |2
mHen àny
ane :L3.6,9,g,6,12
Lt elemunt
Nen u m bi Sum- 26

Ddd numbes Sum 1t

3 Alm: Raad a list o numbou and, p thumbu


esent.in pdel und e posittn Ex [to,5,30,41
o 94,16J, Thu numbe in Odd indu RosTuon:
25, 41 84)
SoURCE CoDE

n int inpu C "Ente a numben: "))

h i in ange ( ) :
c'£mer any nuumbei "))
em int in puf
t . a ppend Ciem)

Po int C" ist elements a n e : ",iut)


psuint ( umben n add index pDslio")
en len (list1)
ind in aange C(en)

Cindle 2!=©):
Pon t I [in!1, ed =
")
OUTPUT
Ente a numbez:
l6
otea any numbe :

Snka any n u m b e :20


E n t a any umEen: 14
B n t e n a n y n u m bN:
64
b4
s e l e m e r k
ase 16, 20, (4, 54
5 4
2o
index
POsitin:
N u n b e n in Odd
ad emoe the d u p t c a t e
lúE oL num bers
4. AlM: Read a

it. C Er: Elen a it ui th depi cate


umbeNs om 10 3D
30 20
elemenb (0 20 1d O 1o 50
801
The uuque Ús:Tto, 20,30, 40, 50,

SOURCE CODE numben: ")


(irput (" Enten
a
n i
DCAnge n):
1in "enten any'
numbe )
m int ( inputt (
T =

s1.ppem ( ilem)
ae ",ut 1)
PAnt" Eelemenu
Lnque ist : e d "
p u n t CU The

tiiem in is1:

em not in uat:
T
uls appen (ikm)".

RoTint Cuish
OUTPUT
numbe : 2
ntto a

e a any umbe12

ke nu mben: 14
Cuny
r e e m e s u ae I2, 14)
The ust iu
unque : [12, 14

You might also like