Team Ai
Apppublic

krishshharma/Code-Explainer

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
sample_code.py13 linesDownload Raw Back to data
1# Fibonacci function2def fib(n):3    """4    Computes Fibonacci sequence up to n terms5    Example: fib(5) → [0, 1, 1, 2, 3]6    """7    a, b = 0, 18    result = []9    for _ in range(n):10        result.append(a)11        a, b = b, a + b12    return result13