""" Lab 1 Program 4 Write a program that generates two lists: list of 0's and 1's, and list of integers between 10 and 20. Write a function game that has 2 parameters - list of 0's and 1's and list of ints between 10 and 20. The function returns two new_lists: new_list1 includes all numbers from second list that corresponds to 0's in the first one, new_list2 includes all numbers from second list that corresponds to 1's in the first one. Example: List1=[0, 1, 1, 0, 0, 1, 1] List2=[10, 12, 13, 20, 16, 17, 19] Output: new_list1=[10, 20, 16] new_list2=[12, 13, 17, 19] """ import random #this function randomly generates list of integers def make_list(size, min_limit, max_limit): my_list=[] for i in range(size): n=random.randint(min_limit, max_limit) my_list.append(n) return my_list def game(list1, list2): size=len(list1) new1=[] new2=[] for i in range(size): if(list1[i]==0): new1.append(list2[i]) else: new2.append(list2[i]) return new1, new2 def main(): list1 = make_list(15, 0,1) list2 = make_list(15,10,20) new1,new2=game(list1,list2) print("original lists") print(list1) print(list2) print("new lists") print(new1) print(new2) main()