Python program to count numbers of even and odd elements in an array

prepinsta-prime

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

1 comments on “Python program to count numbers of even and odd elements in an array”


  • Sharvari

    Python Code :
    size = int(input(“Enter the Array Size : “))
    arr = []
    for i in range(size):
    element = int(input())
    arr.append(element)
    print(arr)

    x = list(dict.fromkeys(arr))
    print(x)