Local variable problem in python, variable is not defines : <p>I am working on a project and keep getting variable not defined errors when I run the script. How can I solve this without declaring global variables</p>

<pre><code>def func1():
    x = 1
def func2():
    y=5
    x + y = z
    print(z)
</code></pre>
