How to factor using Python?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Mar 10 01:48:07 EDT 2008


On 10 mar, 02:08, Nathan Pinno <MadComputer... at gmail.com> wrote:

> How do I factor a number? I mean how do I translate x! into proper
> Python code, so that it will always do the correct math?

Do you want to compute x! (factorial of x)? That is, you want a
program that given a 4, returns 24?
Think how would you compute it by hand and try to write the same thing
using Python instructions.

If you come with a program and have a specific problem someone here
will be able to help you, but don't expect your homework to be done
for free...

--
Gabriel Genellina



More information about the Python-list mailing list