MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / fact

Function fact

Python/factorial.py:8–12  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

6
7'''
8def fact(n):
9 ans = 1
10 for i in range(2, n+1):
11 ans *= i
12 return ans
13n=int(input("Enter the number "))
14f=fact(n)
15print("Factorial of {} is {}".format(n,f))

Callers 1

factorial.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected