def fib_whl(n):
    """
    Compute Fibonnaci sequence using a while loop

    Parameters
    ----------
    n : integer
        the nth Fibonnaci number in the sequence

    Returns
    -------
    the nth Fibonnaci number in the sequence

    """
    res = [0, 1]
    i = 0
    while i<n:
        res.append(res[i] + res[i+1])
        i = i + 1
    return res[n]