human
I am working on the file "Lab01/ML_lab1_review_student.ipynb".
The first task is:
Part 4: Python lambda expressions 
 (4a) Lambda is an anonymous function 
We can use a lambda expression to create a function.  To do this, you type lambda followed by the names of the function's parameters separated by commas, followed by a :, and then the expression statement that the function will evaluate.  For example, lambda x, y: x + y is an anonymous function that computes the sum of its two inputs.
Lambda expressions return a function when evaluated.  The function is not bound to any variable, which is why lambdas are associated with anonymous functions.  However, it is possible to assign the function to a variable.  Lambda expressions are particularly useful when you need to pass a simple function into another function.  In that case, the lambda expression generates a function that is bound to the parameter being passed into the function.
Below, we'll see an example of how we can bind the function returned by a lambda expression to a variable named addSLambda.  From this example, we can see that lambda provides a shortcut for creating a simple function.  Note that the behavior of the function created using def and the function created using lambda is equivalent.  Both functions have the same type and return the same results.  The only differences are the names and the way they were created.
For this exercise, first run the two cells below to compare a function created using def with a corresponding anonymous function.  Next, write your own lambda expression that creates a function that multiplies its input (a single parameter) by 10.
Here are some additional references that explain lambdas: Lambda Functions, Lambda Tutorial, and Python Functions.
Can you write Python code for it?
assistant
#Here is Python code to compare a function created using def with a corresponding anonymous function.

# Example function
def addS(x):
    return x + 's'
print type(addS)
print addS
print addS('cat')

# As a lambda
addSLambda = lambda x: x + 's'
print type(addSLambda)
print addSLambda
print addSLambda('cat')

# TODO: Replace <FILL IN> with appropriate code
# Recall that: "lambda x, y: x + y" creates a function that adds together two numbers
multiplyByTen = lambda x: x * 10
print multiplyByTen(5)

# Note that the function still shows its name as <lambda>
print '\n', multiplyByTen

# TEST Python lambda expressions (4a)
Test.assertEquals(multiplyByTen(10), 100, 'incorrect definition for multiplyByTen')