Skip to content
CodeKruPro

A local variable with the same name as a global

Predict the outputEasyPython onlyAsked in: TCS
main.py
x = 10

def show():
    x = 5
    print("inside", x)

show()
print("outside", x)

Graded by exact match. Spaces at the ends of lines and blank lines at the end do not count.

to answer and keep your progress. Reading is free for everyone.