Last active
May 17, 2020 16:18
-
-
Save biazzotto/1b4c4c0b4c8883aa1a1a5f35a969aee7 to your computer and use it in GitHub Desktop.
Formas de função fatorial em lamba
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
fatorial = lambda x: (x<=1 and 1) or fatorial(x-1)*x | |
fatorial = lambda x: 1 if x<=1 else fatorial(x-1)*x | |
fatorial = lambda x: int(x<=1) or fatorial(x-1)*x | |
fatorial = lambda x: fatorial(x-1)*x if x>1 else 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment