exercism / clojure

Exercism exercises in Clojure.
https://exercism.org/tracks/clojure
MIT License
164 stars 157 forks source link

Error in test for Card Games exercise, 6. More averaging techniques #620

Closed StephanieKemna closed 9 months ago

StephanieKemna commented 9 months ago

Hi y'all,

After coding up answers to the exercise and testing and submitting, and then checking community solutions for ideas, I saw I actually had an error in my implementation, but the current tests aren't noticing that.

If you go to https://exercism.org/tracks/clojure/exercises/card-games/solutions/StephanieKemna (if you can? if not, let me know and I can copy-paste implementations - but I was trying to avoid that in case people google for answers) and compare iteration 1's average-even-odd? to iteration 2's average-even-odd? then the first iteration was in fact not correct.

I have been thinking if it is possible to make a test case where it will actually fail for iteration 1 but not iteration 2, with the current test condition, but I think that is not possible: If the average over even and odd is the same, then the average over all is the same as well. If the average over even and odd is not the same, then the average over all is also not the same. So then you'd have to check the values that people are calculating, but that would change the subexercise. So I don't have a good solution yet, heh, but wanted to flag this in any case.

Thanks in any case for the Exercism platform and exercises and all :)

github-actions[bot] commented 9 months ago

Hello. Thanks for opening an issue on Exercism 🙂

At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.

This issue will be automatically closed. Please use this link%0D%0A&category=clojure ) to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!

If you're interested in learning more about this auto-responder, please read this blog post.