Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fib(0) should be zero , not 1 as in sample code #101

Merged
merged 2 commits into from
Nov 14, 2022
Merged

Conversation

leewalter
Copy link
Contributor

fib(0) should be zero , not 1 as in sample code.

Overview

fib(0) should be zero , not 1 as in sample code

Details :

just tested sample code and found answer incorrect because fib(0) = 1 in sample code, it should be zero instead.
e.g. from sample code Fib(0) = 1 but it should be zero
def fib(x):
if x == 0:
return 0 #instead of 1 as in orig code!

References

see example at https://www.mathsisfun.com/numbers/fibonacci-sequence.html or https://www.geeksforgeeks.org/python-program-for-program-for-fibonacci-numbers-2/

Blocked by

N/A

fib(0) = 0 not 1 as in sample code.
fix fib(0) = 1 in code sample, should be 1
@leewalter leewalter requested a review from odashi as a code owner November 13, 2022 23:07
@google-cla
Copy link

google-cla bot commented Nov 13, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@odashi odashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@odashi
Copy link
Collaborator

odashi commented Nov 13, 2022

I updated the Colab example as well. I will merge this change after the CLA was signed.

@leewalter
Copy link
Contributor Author

signed CLA - thanks a lot for the QUICK response ! You are SUPER FAST !

@odashi odashi merged commit 5dde4e4 into google:main Nov 14, 2022
@odashi odashi added the documentation Improvements or additions to documentation label Nov 14, 2022
@ppoblete
Copy link

Another much more authoritative source to support this change: https://oeis.org/A000045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants