Created
October 19, 2017 04:25
-
-
Save vlazzle/bc30badb5d05fd5e0ce31d72e93901a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def factorial(n): | |
i = 1 | |
factorial = 1 | |
while i <= n: | |
factorial = factorial * i | |
i = i + 1 | |
return factorial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment