Error with factorial in python using classes
<p>I am trying to write a class to solve factorials using recursion. </p>

<p>Here is my code:</p>

<pre><code>class Factorial:

def __init__(self,n):
self.n = n

def factorial(self):
    if self.n == 0:
        return 1 
    else:
        return self.n * self.factorial(self.n - 1)
</code></pre>

<p>I call it by:</p>

<pre><code> fact = Factorial(4) 
 fact.factorial()
</code></pre>

<p>I get this error:</p>

<pre><code>Traceback (most recent call last):
  File "factorial.py", line 13, in &lt;module&gt;
    fact.factorial()
  File "factorial.py", line 10, in factorial
    return self.n * self.factorial(self.n - 1)
  TypeError: factorial() takes exactly 1 argument (2 given)
</code></pre>

<p>Thanks</p>
