Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It's actually a problem with the design of the tests, already pointed out by ejini just below. See also my answer to Jam14man above. I close this issue because it is a duplicate one.
I believe you are missing one case:
This solution is missing the 5th traversal as brendanvos already pointed out. Otherwise, if you would scale up this task to numbers bigger than 13, e.g. equal_to_24(55, 26, 30, 5) would say impossible, however 26-((55+5)/30) = 24.
For anyone wondering, you would need to add
to the solve24 function.
It is necessary, for example equal_to_24(55, 26, 30, 5) would give with his solution a "It's not possible!", however 26-((55+5)/30) = 24.
equal_to_24(1, 4, 6, 5) gives "It's not possible!", however 4 / (1 - (5 / 6)) = 24. I think the authors solution or rather python has some problems with rounding.
This solution is technically false, here's why:
equal_to_24(1, 4, 6, 5) gives "It's not possible!", however 4 / (1 - (5 / 6)) = 24. The author of this kata also gives back "It's not possible!" for the test with these numbers, that's why your solution still got accepted, but his solution or rather python apparently has some problems with rounding.
Edit: I found the problem, your make_string function misses 2 f-strings:
f"({a} {b} ({c} {d} {e})) {f} {g}" and
f"{a} {b} ({c} {d} ({e} {f} {g}))"
By adding these two, your algorithm gives back the technically correct solution 4 / (1 - (5 / 6)).