project_euler/lib/num_fns.py

9 lines
166 B
Python
Raw Normal View History

2024-02-06 13:25:34 +00:00
def isDivBy(num, denom):
return num % denom == 0
2024-02-06 13:45:15 +00:00
def fib(i):
if i == 1:
return 1
elif i == 2:
return 2
return fib(i - 1) + fib(i - 2)