Read The Following Python Code Carefully And Point Out The #704
Read the following Python code carefully and point out the global variables?</p> <pre><code class="language-python">y, z = 1, 2 def f(): global x x = y+z</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Argument Passing, Variables and Recursion - Python Global vs Local Variables - Quiz No.2.
Read the following Python code carefully and point out the global variables?
y, z = 1, 2 def f(): global x x = y+z
x
y and z
x, y and z
Neither x, nor y, nor z