a = 5
b = 2
c = 3
s = "message"
def a(a, b, s):
global c
for a in range (3):
c += 1
s = 0
return a + b + c + s
s = 5
def b(a, b, s):
c = 10
return a + b + c + s
print (a(1, 2, 3))
print (b(1, 2, 3))
print (s)
State the scope (using line numbers) of the following variables. The scope may be
made up of disconnected regions. State whether the variable is a global variable or
local variable.
(i) The variable c at line 7
(ii) The function a() at line 6
(iii) The variable a at line 6
(iv) The variable a at line 8