Computer Science, asked by karishmarajak, 10 months ago

Python
3)using range (1,101),make two list one containing all even number and other containing all odd number ​

Answers

Answered by stefangonzalez246
2

Python program

  The given below show the program to separate the even numbers and odd number in the given list.

Program:

def split(mix):

ev_li = []

od_li = []

for i in mix:

if(i%2 == 0):

ev_li.append(i)

else

od_li.append(i)

print("even number:",ev_li)

print("odd number:", od_li)

mix=[3, 4, 12, 16, 53, 60, 77, 80, 99]

split(mix)

Output:

Even lists: [4, 12, 16, 60, 80]

Odd lists: [3, 53, 77, 99]

To Learn more...

brainly.in/question/6784410

brainly.in/question/10205499

Similar questions