Nov-01-2018, 11:39 PM
(This post was last modified: Nov-02-2018, 07:32 PM by ichabod801.)
hi
num=1000 def inc(): increment = num + 1 return inc print(inc())in inc function the number 1000 is incremented by one and it is giving 1001 .when function is called again it is giving the same value 1001.what should be changed so that on every call to the function the value should increment by one and values like 1001,1002,1003............