1. T/F: - A perceptron can be trained to compute any function of two binary inputs. - For perceptron learning, larger values of lambdas will cause smaller changes in the weights. - The base case for a recursive function that takes as input a list will always be []. - If we ran the following code, 10 would be printed: def mystery(x): x = 2 x = 10 mystery(x) print(x) 2. Given the following perceptron, fill in the table below for the output from this perceptron for the inputs. a -> 1 ----| V b -> -1 -> in ^ c -> 0.5---| T = -0.5 a b c ----- 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 3. Below is the perceptron update rule: w_i = w_i + \lambda * (actual - predicted) * x_i For the following perceptron: a -> 1 ----| V b -> 0 --->in ^ 1 -> -0.5 -| a. What would be the weights if we trained on the following example with lambda = 0.5 (assuming a threshold of 0): a b actual 0 0 -> 0 b. What would be the weights if we training on the following example with lambda = 0.5 (assuming we're starting with the original network NOT the network after running the previous example through): a b actual 1 1 -> 0 4. Write a recursive function count_even that takes as input a list and returns the number of even elements in that list. You may NOT use a for loop. >>> count_even([1, 2, 3, 4, 5]) 2 5. Write a function called swap that takes as input a dictionary and returns a new dictionary where key is the old value and the value is the old key, i.e swaps the key/values. You may assume that the value are unique. >>> d = {"a":1, "b":2, "c":3} >>> swap(d) {1: 'a', 2: 'b', 3: 'c'} 6. Write a function called capitalized_lines that takes as input a file and counts the number of lines that start with a capital letter.