Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 2

PROGRAM 4

AIM:WAP to implement LEGB Rule.


def outer(x):

x=x+1

print(x)

def inner(y):

y=y+1

print('x is from outer',x)

print('inner',y)

print('z is from main segment',z)

inner(z)

z=10

print(z)

outer(20)

OUTPUT:

You might also like