Question: what are local variables and global variables in python?
Answer: A global variable can be reached anywhere in the code, a local only in the scope. A global variable (x) can be reached and modified anywhere in the code, local variable (z) exists only in block 3.