In this program:
num = 1
def fun1(num):
print(num)
Does the variable num
function as both a global
and a local variable
here? Because num
is now a parameter, does that make it a variable local to fun1()
?
In this program:
num = 1
def fun1(num):
print(num)
Does the variable num
function as both a global
and a local variable
here? Because num
is now a parameter, does that make it a variable local to fun1()
?