Skip to content

Fix zeroth fibonacci and negative number handling#3

Merged
leongcmu merged 1 commit into
mainfrom
fix-zerothfibonnaci
Jan 17, 2026
Merged

Fix zeroth fibonacci and negative number handling#3
leongcmu merged 1 commit into
mainfrom
fix-zerothfibonnaci

Conversation

@leongcmu
Copy link
Copy Markdown
Owner

Fixes #1

This PR addresses the failing test cases for the fibonacci function:

  • Added handling for position 0 to return 0
  • Added handling for negative positions to return None
  • All base cases now work correctly

Changes made to fib.py:

  • Added check for negative numbers
  • Added base case for position 0

@leongcmu leongcmu merged commit a04ca45 into main Jan 17, 2026
1 check passed
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.

RecursionError: zeroth_fibonacci

1 participant