Skip to content

feat: add fibonacci function with edge case handling - #13

Open
Karlhezenberg wants to merge 1 commit into
gougousongsong:mainfrom
Karlhezenberg:fix/fibonacci-function
Open

feat: add fibonacci function with edge case handling#13
Karlhezenberg wants to merge 1 commit into
gougousongsong:mainfrom
Karlhezenberg:fix/fibonacci-function

Conversation

@Karlhezenberg

Copy link
Copy Markdown

Changes

  • Added fibonacci(n) function to src/math_utils.py
  • Handles edge case: n < 0 raises ValueError with message "n must be non-negative"
  • Added comprehensive tests to tests/test_math_utils.py
  • All 7 tests pass

Test Results

tests/test_math_utils.py::test_add PASSED
tests/test_math_utils.py::test_multiply PASSED
tests/test_math_utils.py::test_fibonacci_normal PASSED
tests/test_math_utils.py::test_fibonacci_edge_cases PASSED
tests/test_math_utils.py::test_fibonacci_negative PASSED
tests/test_string_utils.py::test_reverse_string PASSED
tests/test_string_utils.py::test_to_uppercase PASSED

7 passed in 0.04s

Bounty

This PR addresses issue #1 ($50 bounty).

…ngsong#1)

- Add fibonacci(n) function to src/math_utils.py
- Handle edge case: n < 0 raises ValueError
- Add comprehensive tests to tests/test_math_utils.py
- All 7 tests pass

Bounty: 0
Signed-off-by: Karlhezenberg <hazardkarl0@gmail.com>
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