1. - False. E.g. the XOR function. - False. Larger values of lambda will cause *larger* changes in the weights. - False. Although this is a common base case, other bases cases may make sense, like a list with one item in it for rec_max. - True. When the mystery function is called 10 gets associated with the parameter x, but the original x variable also exists and has it's own value. Updating the parameter to 2 in the function does not change the external x variable. 2. a b c output 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 (>= threshold is 1) 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 3. a. No change to the weights. predicted = actual. b. predicted = 1 actual = 0 w_1 = 1 + 0.5 * (-1) * 1 = 0.5 w_2 = 0 + 0.5 * (-1) * 1 = -0.5 w_3 = -0.5 + 0.5 * (-1) * 1 = -1 4. def count_even(list): if list == []: return 0 else: count = count_even(list[1:]) if list[0]%2 == 0: return 1 + count else: return count 5. def swap(d): new_d = {} for key in d: value = d[key] new_d[value] = key return new_d 6. def capitalized_lies(filename): file = open(filename, "r") count = 0 for line in file: if line[0].isupper(): count += 1 return count