Back to SDS/2 Parametric Scripts

"""

This is a test of reading a documentation string.

"""

def factorial(n):

    """

    This function returns the factorial of a number.

    The factorial of 6 is 6*5*4*3*2.

    This function uses recursion.

    """

    if n == 0 or n == 1:

        return 1

    else:

        f = (n*factorial(n-1))

    return f

 

print factorial(6)

print factorial.__doc__

print __doc__

 

"""

720

 

    This function returns the factorial of a number.

    The factorial of 6 is 6*5*4*3*2.

    This function uses recursion.

   

 

This is a test of reading a documentation string.

"""