[New-bugs-announce] [issue2138] Factorial

David Albert Torpey report at bugs.python.org
Mon Feb 18 11:09:28 CET 2008

New submission from David Albert Torpey:

Add a factorial method.  Everybody understands what it means before 
they are out of high school and it comes up all the time in statistics 
and combinatorics.  Ruby has a factorial method and heck even basic 
calculators have a factorial key.

print n.factorial()

Maybe raise ValueError if n is negative.

components: Interpreter Core
messages: 62520
nosy: dtorp
severity: normal
status: open
title: Factorial
type: rfe
versions: Python 2.6

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list