Question: Scope defines where variables can be accessed. What variables are within the scope of the inner 2 function? q = 1 def outer 1 (

Scope defines where variables can be accessed. What variables are within the scope of the inner2 function?
q =1
def outer1(i):
j = i +1
def outer2():
k = j +1
def inner1():
m = k +1
def inner2():
n = q + m +1
return n
m = inner2()
return m
k = inner1()
return k
j = outer2()
return j
print (""outer1(1)="", outer1(1))
a.)
n, m, k, j, i, q
b.)
j, k, i, m, n, p, q
c.)
n, m, k, j, i
d.)
n, m, q

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!