1#Every one can use this varible
2x = 9
3def num_returner():
4 return x
5print(num_returner())
6
7#--------------------------------------
8x = 90
9def private_var():
10 num = 20
11 return x + num
12print(private_var())
13#it will give an error because it is not the public variable on the function
14print(num)
15
1a = 5
2
3def f1():
4 a = 2
5 print(a)
6
7print(a) # Will print 5
8f1() # Will print 2
1a = 5
2b = 3
3
4def f1():
5 a = 2
6 print(a)
7 print(b)
8
9print(a) # Will print 5
10f1() # Will print 2 and 3