Exercise: Enclosing Scope

In this exercise, the function outer returns the result of inner. x within inner from the enclosing function and multiply it with the local variable y.
def outer(): x = 3 def inner(): y = 2 #### complete code here ####
result =
############################ return result return inner() print(outer()) # expected: 6
Python
Setting up Python environment...
Output