Computer Science, asked by akshatvashisht6, 6 months ago

WAP to enter all the even numbers between 2 to 50 in a list called evenList.in python​

Answers

Answered by arcnagpal1234
1
evenList = [2]

for i in range(2,51,2):
evenList.append(i)

print(evenList)

Answered by gaganadithyareddy9
0

Answer:

evenList = [ ]

for i in range(1, 51):

   if i%2 == 0:

       evenList.append(i)

print(evenList)

Similar questions