MCPcopy Index your code
hub / github.com/python/cpython / fact

Method fact

Lib/test/test_scope.py:234–238  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

232
233 def f(x):
234 def fact(n):
235 if n == 0:
236 return 1
237 else:
238 return n * fact(n - 1)
239 if x >= 0:
240 return fact(x)
241 else:

Callers

nothing calls this directly

Calls 1

factFunction · 0.85

Tested by

no test coverage detected