Created
November 29, 2015 18:29
Calculo de fatorial em python
This file contains hidden or 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 fatorial(numero): | |
multiplicador = numero - 1 | |
resultado = numero | |
while multiplicador >0: | |
resultado = resultado * multiplicador | |
multiplicador = multiplicador -1 | |
return resultado |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment