Skip to content

Fix typo in Fibonacci example#1

Open
varunvats wants to merge 1 commit intosequoiatree:masterfrom
varunvats:fix_type_fibonacci
Open

Fix typo in Fibonacci example#1
varunvats wants to merge 1 commit intosequoiatree:masterfrom
varunvats:fix_type_fibonacci

Conversation

@varunvats
Copy link

@varunvats varunvats commented Jun 25, 2019

The line for computing fib_14 in the code snippet uses fib_13 twice:

>>> fib_14 = fib_13 + fib_13
>>> fib_14
377

While the result shown for fib_14 is correct (377), going by the above, the result of fib_14 would be 466 instead.

This line should instead be:

>>> fib_14 = fib_13 + fib_12

The line for computing fib_14 in the code snippet uses fib_13 twice:

>>> fib_14 = fib_13 + fib_13
>>> fib_14
377

While the result shown for fib_14 is correct (377), going by the
above, the result of fib_14 would be 466 instead.

This line should instead be:

>>> fib_14 = fib_13 + fib_12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant