You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
320 B
Plaintext

# For what Recursion is, please check theory/recursion
# Simple Factorial Python Recursion
def factorial(n) :
if n == 0 :
return 1
else :
return n * factorial(n-1)
# Simple Greatest Common Divisor Recursion
def gcd(x, y) :
if y == 0 :
return x
else :
return gcd(y, x%y)