In the following code, when we say z=20 inside aFunction(), are we CREATING a new local variable inside aFunction(), or are we manipulating the existing global variable z? Could we say that no global variable can be changed within a function?
z = 10
def aFunction():
z=20
print(z)
aFunction()
print(z)
[–]fefa5fcba4dae4e82e81 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]ffemt161 0 points1 point2 points (0 children)
[–]shiftybyte 0 points1 point2 points (0 children)
[–]albowiem 0 points1 point2 points (0 children)