def loop2(dct): # for loop over dictonary keys # enters odd, even, or 0 values corresponding to keys in dictionary for num in dct: num_type = task1_assign6.odd_even(num) dct[num] = num_type return dct
def loop1(ls): # for loop over list # defines corresponding list of oddness/evenness for every item in ls ls_odd_even = [] for item in ls: num_type = task1_assign6.odd_even(item) ls_odd_even.append(num_type) return ls_odd_even