The code snippet in question 1 is given below:
def temp(): return b*b b = 2 a=temp() print(a)
Here b is declared after its use in the function that is defined above. Can you please explain how does this work in terms of the variables declaration and use in a sequence.
Also if you could throw some light on the scope of the variables?