Daily Coding Challenge - Hidden Treasure

Tell us what’s happening:

I am doing the daily challenge called hidden Treasure. according to the instructions when the coordinate points to “O” the return value should be “Recovered”. However according to the 3. test dive([[ “-”, “X”], [ “-”, “O”], [ “-”, “O”]], [1, 1]) should return “Found”. I don’t understand why it is not “Recovered”.

Your code so far

def dive(map, coordinates):
    if map[coordinates[0]][coordinates[1]] == "-":
        return "Empty"
    elif map[coordinates[0]][coordinates[1]] == "X":
        return "Found"
    elif map[coordinates[0]][coordinates[1]] == "O":
        return "Recovered"

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15

Challenge Information:

Daily Coding Challenge - Hidden Treasure
https://www.freecodecamp.org/learn/daily-coding-challenge/2025-10-24

because there are two O in those coordinates, that means two places for treasure

You go to one of those points, then you give back Found because

  • If the dive location finds treasure, but at least one other part of the treasure remains unfound, return "Found".
1 Like

[Edit] - never mind. I guess I didn’t really understand the description…

There is? What issue is there?

There is not an issue with the test cases.