Created
May 25, 2013 08:37
-
-
Save Abhishek-Srivastava/5648375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def double(x): | |
global x | |
x = x*2 | |
return | |
double(x) | |
#Instead this could be done | |
def double(n): | |
n = n * 2 | |
return n | |
x = double(x) | |
# Or | |
function doubleX(): | |
global x | |
x = x * 2 | |
return | |
doubleX() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment