Download python/factorial.py from neopilot/PyRs2: direct link, hf CLI and curl.
- Browser
- Download file 114 Bytes
-
https://huggingface.co/datasets/neopilot/PyRs2/resolve/main/python/factorial.py
- Command line
-
hf download hf://datasets/neopilot/PyRs2/python/factorial.py
-
curl -L -o factorial.py https://huggingface.co/datasets/neopilot/PyRs2/resolve/main/python/factorial.py
114 Bytes
| def factorial(n): | |
| if n == 0: | |
| return 1 | |
| else: | |
| return n * factorial(n-1) | |
| print(factorial(5)) |