Solution: Fibonacci Sequence
Go over the implementation of generating the Fibonacci sequence.
We'll cover the following...
Solution
Press + to interact
array = [1, 1]num1 = 1num2 = 110.times donext_number = num1 + num2array << next_numbernum1 = num2num2 = next_numberendputs "The number of rabbit pairs are: #{array.join(', ')}"
Explanation
Line 4: We ...