Hands on: Complete tests and implement a working solution for find_maxima #1

Open
opened 2024-08-26 22:36:17 +02:00 by pamela · 0 comments
Owner

The goal is to complete the existing test, so that all examples mentioned in the lecture are covered and write an implementation of a find_maxima function that passes these tests.

  • Go to the directory hands_on/local_maxima_part2 and edit the find_maxima function.

  • The module test_local_maxima.py contains tests corresponding to the examples on slide 6. Complete the last two test.

    • input = [1, 2, 2, 1] ; expected output = [1] (or [2] or [1, 2] or ... - you decide)
    • input = [1, 2, 2, 3, 1] ; expected output = [3]
  • Write an implementation of the find_maxima function in the module local_maxima.py (you can start from the version you had before), running the tests as you go until you have code that makes all tests pass.

  • Create a Pull Request for this issue.

  • Clean up the code until you are happy, making sure that the tests continue to pass.

The goal is to complete the existing test, so that all examples mentioned in the lecture are covered and write an implementation of a find_maxima function that passes these tests. - Go to the directory hands_on/local_maxima_part2 and edit the find_maxima function. - The module test_local_maxima.py contains tests corresponding to the examples on slide 6. Complete the last two test. - input = [1, 2, 2, 1] ; expected output = [1] (or [2] or [1, 2] or ... - you decide) - input = [1, 2, 2, 3, 1] ; expected output = [3] - Write an implementation of the find_maxima function in the module local_maxima.py (you can start from the version you had before), running the tests as you go until you have code that makes all tests pass. - Create a Pull Request for this issue. - Clean up the code until you are happy, making sure that the tests continue to pass.
pamela changed title from Hands on: Complete tests and implement a working solution for find_maxima #1 to Hands on: Complete tests and implement a working solution for find_maxima 2024-08-26 22:36:25 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ASPP/2024-heraklion-testing-debugging#1
No description provided.