Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Krause
pytoy
Commits
33bd7858
Commit
33bd7858
authored
Dec 06, 2018
by
Michael Krause
🎉
Browse files
Fix factorial: use recursive implementation
parent
63d99622
Changes
1
Hide whitespace changes
Inline
Side-by-side
values.py
View file @
33bd7858
...
...
@@ -13,7 +13,6 @@ def pi(n):
return
pii
def
factorial
(
n
):
r
=
1
for
i
in
range
(
n
+
1
):
r
*=
i
return
r
if
n
==
0
:
return
0
return
n
*
factorial
(
n
-
1
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment