Python Program to Count Even and Odd Numbers in Set

Python Program to Count Even and Odd Numbers in Set 1

Write a Python Program to Count Even and Odd Numbers in Set. The for loop (for eoVal in evodSet) iterates all the set items. And the if condition (if(eoVal % 2 == 0)) checks whether the Set item divisible by two equals zero. If True, we add one to the even Set count; otherwise (sOddCount … Read more