Static analysis incorrectly detects the following as erroneous (due to erroneous code after return):
In MyPyTutor for CSSE1001: Functionality Programming the follow code is entered:
def add_functions(f,g):
""" Returns a function that accepts a single argument and returns f(x) + g(x)
"""
return lambda x: f(x) + g(x)
add = lambda f,g:f+g
return add
the following error occurs:
Your lambda should only take in a single arg
Static analysis incorrectly detects the following as erroneous (due to erroneous code after return):