-
-
Save khuyentran1401/5392270cae154fd0f552b53d3782d7d1 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
import heartrate | |
heartrate.trace(browser=True) | |
def factorial(x): | |
if x == 1: | |
return 1 | |
else: | |
return (x * factorial(x-1)) | |
if __name__ == "__main__": | |
num = 5 | |
print(f"The factorial of {num} is {factorial(num)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment