# python program to find even or odd in a user defined natural numbers num = int(input('How many natural nos. : ')) li = [] for i in range(1,num+1): n = int(input(f'enter the element no. {i} in the list : ')) li.append(n) even = [] odd = [] for j in li: if j%2 == 0: even.append(j) else: odd.append(j) print('\nlist is : {}'.format(li)) print('even numbers are {}'.format(even)) print('odd numbers are {}'.format(odd))
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc