4. Write a function named is_fib_like that takes a list of integers as a parameter and that returns whether or
not the sequence matches the pattern of the Fibonacci sequence (True if it does, False if it does not). The
Fibonacci sequence begins with the number 1 followed by the number 1 and each successive value is the sum
of the two previous values: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, and so on. It is possible to follow this pattern with
different starting values. For example, Lucas numbers start with the values 2 and 1 but otherwise follow the
Fibonacci pattern. Your function should determine whether each value after the first two is the sum of the
previous two values in the sequence, returning True if the sequence has that pattern and returning False if it
does not. If the list has two or fewer values, your function should return True. Below are sample lists and
the value that should be returned for each:
Contents of list passed to is_fib_like
Value returned by is_fib_like
[]
True
[42]
True
[18, 42]
True
[1, 1, 1]
False
[1, 2, 3]
True
[0, 0, 0, 0, 0]
True
[1, 1, 2, 3, 5, 8, 13, 21]
True
[2, 1, 3, 4, 7, 11, 18, 29]
True
[1, 1, 2, 3, 5, 12, 17]
False