> numpy/scipy etc... are quite useful for Euler :)
I've come to love sympy, personally.
> They contain a function to do factorials (and loads more).
>>> from math import factorial
>>> factorial(5)
120
Geremy Condra
--
http://mail.python.org/mailman/listinfo/python-list
Even though you've worked it out -- a couple of tips:
On Dec 9, 5:39 pm, SiWi wrote:
> On Dec 9, 6:36 pm, SiWi wrote:
>
>
>
> > Dear python community,
> > I've got a wierd problem and I hope you can help me out at it.
> > I wrote the following code to find the Sum of the factorial of the
> > dig
On Dec 9, 6:36 pm, SiWi wrote:
> Dear python community,
> I've got a wierd problem and I hope you can help me out at it.
> I wrote the following code to find the Sum of the factorial of the
> digits of a number (this is for Project Euler 74):
>
> def fac(n):
> x=1
> for i in range(2,n+1):
Dear python community,
I've got a wierd problem and I hope you can help me out at it.
I wrote the following code to find the Sum of the factorial of the
digits of a number (this is for Project Euler 74):
def fac(n):
x=1
for i in range(2,n+1):
x*=i
return x
t=tuple(fac(n) for n