a guest Oct 20th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def factorial(input):
- """This function only supports positive numbers. Takes a number and returns its factorial """
- input = abs(input)
- if input is 1:
- return 1;
- return input * factorial(input-1)
RAW Paste Data