equinor / equinor/tdd_workshop
Exercise 2: Treasure hunt
- Dominant language
- Python
- Stars
- 2
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
You are an intrepid explorer, navigating a scenery of rolling hills at night. It is completely dark, and your only source of information is your handheld computer which will give you the next point on your journey. You have heard that there exists a treasure here, and your only clue is that the treasure is located in an incline where the slope between your current position and the next coordinate is above X. Your task is to navigate this landscape and locate the coordinates of the treasure. Example:
Given a list of coordinates (your test input) (x, y):
```python
[(1, 1), (2.0, 1.8), (2.5, 2.1), (3, 2), (4.3, 7.2), (5.3, 6.2)]
```
we can calculate the slope along the coordinates:
```python
[0.8, 0.6, -0.2, 4.0, -1.0] # be wary of rounding of these numbers
```
given a threshold of 1, the coordinate we are looking for is: (4.3, 7.2)
Your task in image form:

Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no file or test entry point. Start with the coordinate example and verify how consecutive slopes, the threshold, and rounding determine the target; done means the exercise handles the shown input and threshold correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100