18 lines
277 B
Python
18 lines
277 B
Python
#!/usr/bin/env python
|
|
|
|
"""Calcule la factorielle d'un entier N positif"""
|
|
|
|
|
|
def main() -> None:
|
|
print(Factorielle(5))
|
|
|
|
|
|
def Factorielle(N : int) -> int:
|
|
if N == 1:
|
|
return 1
|
|
else:
|
|
return N * Factorielle(N - 1)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|