Required Problems

In this section, you are required to complete the problems below and submit your code to OJ website.

Several doctests refer to these functions:

from operator import add, mul, sub

square = lambda x: x * x
identity = lambda x: x
triple = lambda x: 3 * x
increment = lambda x: x + 1

Remember, you can use ok to test your code:

$ python ok  # test all functions
$ python ok -q <func>  # test single function