#write a function even_odd that has one parameter - integer number #function returns True if the parameter is even, and False otherwise #write a program (main) that randomly generates 10 ints between -10 #and 10 and counts the number of evens and odds in randomly #generated sequence import random def even_odd(num): if(num%2==0): return True else: return False #another solution def even_odd1(num): if(num%2==0): result=True else: result=False return result def main(): count_even=0 count_odd=0 for i in range(10): num=random.randint(-10,10) print(num) result=even_odd(num) if(result==True): count_even=count_even+1 else: count_odd=count_odd+1 print("evens=",count_even,"odds=",count_odd) main()