Jan-25-2020, 03:37 AM
Please, can someone help me with this problem:
The Fibonacci sequence is a series of related numbers. Usually, the series begins with the numbers 0 and 1, and every successive number is calculated as the sum of the previous two numbers. So the first 11 elements of the series are:
0 1 1 2 3 5 8 13 21 34 55
You must write a program that contains a function called fibonacci_index This function should receive as parameter the index (or position) that you want to know within the Fibonacci series. The function must return the Fibonacci number in that index. For example, if index 6 is requested, the result must be 5, and if index 11 is requested, the result must be 55.
The Fibonacci sequence is a series of related numbers. Usually, the series begins with the numbers 0 and 1, and every successive number is calculated as the sum of the previous two numbers. So the first 11 elements of the series are:
0 1 1 2 3 5 8 13 21 34 55
You must write a program that contains a function called fibonacci_index This function should receive as parameter the index (or position) that you want to know within the Fibonacci series. The function must return the Fibonacci number in that index. For example, if index 6 is requested, the result must be 5, and if index 11 is requested, the result must be 55.