defining functions

Patio87 patio87 at aol.com
Sun Feb 10 21:41:59 EST 2002


I am pretty new to python, and I dont understand the parameters when defining
functions. Whenever I see a function definition with a argument It seems like
the argument already is a variable, but it goes threw the function and it makes
no sense. I dont know if what I just said made any sence but if you can help me
please reply

def factorial(n):
    if n == 1:
        return 1
    else:
        return n * factorial(n-1)
What the hell does 'n' have assingned to it?




More information about the Python-list mailing list