Quickpaste.it
Create Paste
Top Pastes
Recent Pastes
Settings
Account
Untitled Paste
Created By
Anonymous
Expires never
Raw
Download
0
COUNTING ODD & EVEN NUMBERS FROM ARRAY OF NUMBERS n=int(input("Enter the count of numbers you want in number list:")) a=[] ceve=0 codd=0 for i in range(n): lis=int(input("Enter the number:")) a.append(lis) for i in a: if (i%2==0): ceve+=1 else: codd+=1 print("The count of odd numbers in the given list is:",codd) print("The count of even numbers in the given list is:",ceve) OUTPUT Enter the count of numbers you want in number list:6 Enter the number:44 Enter the number:31 Enter the number:67 Enter the number:89 Enter the number:90 Enter the number:32 The count of odd numbers in the given list is: 3 The count of even numbers in the given list is: 3