human
I am working on the file "Section 2 - Advance Python/Chapter S2.01 - Functional Programming/02_01_Functions_as_First_Class_citizens.ipynb".
The first task is:
Problem with local and global
Lets take the above example, we have two functions, outer & inner. We also have x variable which is present as global and also present in both the functions.
If we want to access x of outer function from inner function than global keyword not help. Fortunately, Python provides a keyword nonlocal which allows inner functions to access variables to outer functions as shown in below example. 
The details of nonlocal are details in https://www.python.org/dev/peps/pep-3104/
Can you write Python code for it?
 Write me a the Python code you requested?
assistant
#Here is the Python code you requested.

x = 0
def outer():
    x = 1
    def inner():
        nonlocal x
        x = 2
        print("inner:",x, "id:", id(x))

    inner()
    print("outer:",x, "id:", id(x))

outer()
print("global:",x, "id:", id(x))

def outer(a):
    """
    Outer function 
    """
    PI = 3.1415
    
    def inner(x):
        """
        inner function
        """
        nonlocal PI
        print(PI)
        y = x*PI*a 
        return("y =" + str(y))
    
    print(a)
    return inner

ten = outer(10)
second = outer(20)
print("*"*20)
print(ten)
print(ten(10))
print("*"*20)
print(second)
print(second(10))