QC67_cosmo / creations /20260719_203817_python_generated.python
phera-ra's picture
FINAL: Complete Genesis kit with full COSMOS integration, code generation, portable weights, and neuromorphic learning
775ef4d verified
Raw
History Blame Contribute Delete
264 Bytes
def fibonacci(n):
"""Calculate Fibonacci number at index n."""
if n < 0:
raise ValueError("Negative indices are not supported.")
a = 0
b = 1
for _ in range(n):
a, b = b, a + b
return a