Timeline for Find the Factorial!
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 15, 2024 at 1:51 | comment | added | Lucenaposition | You can also use x<1 instead of 0**x (returns True which is equal to 1 when x=0) | |
| Aug 6, 2019 at 16:34 | comment | added | pavi2410 | Oh! I thought 0**0 is undefined mathematically which confused me. | |
| Aug 5, 2019 at 18:13 | comment | added | univalence | @Pavitra: 00=1, and it's the first thing that evaluates so it gets returned. For any other n, 0n=0, thus the first operand of or is falsey, such that the second operand gets evaluated. | |
| Aug 4, 2019 at 5:36 | comment | added | pavi2410 | Can anyone tell me what's the trick behind 0**x? | |
| Jan 21, 2017 at 17:51 | comment | added | FlipTack | @JackBates that counts as a builtin, as you didn't write the code to compute the factorial. | |
| Jan 19, 2017 at 20:21 | comment | added | user63571 | What about math.factorial? It isn't a built-in, is it? | |
| Jul 11, 2011 at 20:25 | history | edited | Alexandru | CC BY-SA 3.0 | deleted 4 characters in body |
| Jul 11, 2011 at 20:25 | comment | added | Alexandru | Good trick: 0**x. | |
| Jul 11, 2011 at 11:53 | history | answered | Kirill | CC BY-SA 3.0 |