Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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