Skip to content

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

@StephanieKemna

Description

@StephanieKemna

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions