human
I am working on the file "PythonBootCamp/Complete-Python-Bootcamp-master/.ipynb_checkpoints/Nested Statements and Scope-checkpoint.ipynb".
The first task is:
Interesting! But how does Python know which x you're referring to in your code? This is where the idea of scope comes in. Python has a set of rules it follows to decide what variables (such as x in this case) you are refrencing in your code. Lets break down the rules:
This idea of scope in your code is very important to understand in order to properly assign and call variable names. 
In simple terms, the idea of scope can be described by 3 general rules:

Name assignments will create or change local names by default.
Name references search (at most) four scopes, these are:
local
enclosing functions
global
built-in

Names declared in global and nonlocal statements map assigned names to enclosing module and function scopes.

The statement in #2 above can be defined by the LEGB rule.
LEGB Rule.
L: Local — Names assigned in any way within a function (def or lambda)), and not declared global in that function.
E: Enclosing function locals — Name in the local scope of any and all enclosing functions (def or lambda), from inner to outer.
G: Global (module) — Names assigned at the top-level of a module file, or declared global in a def within the file.
B: Built-in (Python) — Names preassigned in the built-in names module : open,range,SyntaxError,...
Quick examples of LEGB
Local
Can you write Python program for it?
assistant
#Here variables (such as x in this case) you are refrencing in your code.

# x is local here:
f = lambda x:x**2