Adding code and test for Fibonacci series with loop