def teste():
    x = 8
    print("Na funcao teste, n vale {}".format(n))
    print("Na funcao teste, x vale {}".format(x))


# PROGRAMA PRINCIPAL
n = 2
x = 1
print("No programa principal, n vale {}".format(n))
teste()
print("Na programa principal, x vale {}".format(x))

def teste():
    x = 8
    print("Na funcao teste, n vale {}".format(n))
    print("Na funcao teste, x vale {}".format(x))


# PROGRAMA PRINCIPAL
n = 2
x = 1
print("No programa principal, n vale {}".format(n))
teste()
print("Na programa principal, x vale {}".format(x))

# PROGRAMA PRINCIPAL