Last answered:

13 Dec 2021

Posted on:

11 Dec 2021

0

Resolved: doubt in question No --- 2

Hi,

--The required outcome as per question no 2 is - "value pairs that represent the first 12 values of the Fibonacci sequence"
--The outcome is as below as per code provided in the solution:
{1: 0, 2: 1, 3: 1, 4: 2, 5: 3, 6: 5, 7: 8, 8: 13, 9: 21, 10: 34, 11: 55, 12: 89}

Please clarify on basis we can consider this outcome as Fibonacci sequence.
1. few numbers in the pair sequence are not of Fibo ( 4,6,9)
2. sum of pair also not matching with fibo sequence.

Kindly confirm am I missing any other points here.

Thanks in Advance.

3 answers ( 1 marked as helpful)
Instructor
Posted on:

13 Dec 2021

2

Hey Rajesh,

Thank you for your question!

The keys of the dictionary represent the index of a specific Fibonacci number in the sequence. For example, 0 is the 1st number in the sequence, 1 is the second, 1 is the third, 2 is the fourth, etc. In turn, the values in the dictionary represent the numbers from the sequence. These are:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, etc.

I hope that answers your question!

Kind regards,
365 Hristina

Posted on:

13 Dec 2021

0

Now I got it - thank you...

this should be read as Keys : values as per dictionary.
Keys are 1,2,3...up to 12
values are Fibonacci sequences.

Instructor
Posted on:

13 Dec 2021

0

Hey Rajesh,

That is exactly correct!

Kind regards,
365 Hristina

Submit an answer