Skip to content

Commit 56de121

Browse files
committed
add faculty
1 parent 6944be8 commit 56de121

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/Algorithmen/faculty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
n = zahl_zu_faktorisieren
88
def factorial(n):
9-
if (n==1):
10-
return n
9+
if (n==0):
10+
return 1
1111
else:
1212
return n*factorial(n-1)
1313

0 commit comments

Comments
 (0)