We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccf00a2 commit 957a4c0Copy full SHA for 957a4c0
1 file changed
06/tasks/task_04_factorial.py
@@ -4,4 +4,9 @@ def factorial(n: int) -> int:
4
"""
5
Vrátí faktoriál čísla n.
6
7
+ if n == 0 or n == 1:
8
+ return 1
9
+ else:
10
+ return n * factorial(n-1)
11
+
12
0 commit comments