What will be the output of the following program?
num = 1 def myfunc() : return num print (num) print (myfunc()) print (num)
1 1 1
The code initializes a global variable num with 1. myfunc just returns this global variable. Hence, all the three print statements print 1.