Beginnger Question
Dennis
dennis at horsethieves.com
Tue Apr 9 10:24:12 EDT 2002
If there's a better forum for asking newb questions, please point me
there!
I'm new to programming. My only experience up to this point is some
aborted attempts to learn C and Java. I'm finding Python much easier
to learn than those. Currently, I'm pushing my way through
"Non-Programmers Tutorial for Python" by Josh Cogliati.
My current problem is this:
x = 2
def wrong(num):
return num + 1
print wrong(x)
print wrong(x)
I cannot figure out why this (simplified) program won't increment x
and produce 3 and 4. This is probably indicative of a bigger problem
with understanding functions (and their limitations). Are there any
sources out there that explain functions more in-depth and clearly?!
Thanks for any and all help.
Dennis
dennis at horsethieves.com
More information about the Python-list
mailing list