Le 11/01/13 16:35, kwakukwat...@gmail.com a écrit :
> def factorial(n):
>     if n<2:
>              return 1
>     f = 1
>     while n>= 2:
>         f *= n
>         f -= 1
>     return f
>  
>
>
I guess you mean:
    f = 1
    while n>= 2:
        f *= n
        n -= 1
    return f

Try it.



-- 
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to