def calc(n): s = 0.0 for i in range(n): s += 1.0 / factorial(i + 1) return s
def test_float(self): result = factorial(1.1) self.assertEqual(result, None)
def test_five(self): result = factorial(5) #We manually call the function to be tested. self.assertEqual(result, 120)
def test_one(self): result = factorial(1) self.assertEqual(result, 1)
import mymodule as my n = int(input("Enter some n:")) result = my.factorial(n) print(result)