Scope with Function


    n = 4
    def f1():
        n = n ** 4
        print(n)    # UnboundLocalError: local variable 'n' referenced before assignment
    f1()