#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 #Second solution for MAIN import random def even_odd(num): if(num%2==0): return True else: return False 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(even_odd(num)==True): #if(even_odd(num)): count_even=count_even+1 else: count_odd=count_odd+1 print("evens=",count_even,"odds=",count_odd) main()