I’m encountering some instruction ambiguity with the Julia-Word Count exercise. Specifically the “handles cramped lists” test.
Given input one,two,three
, the test is expecting three individual words out.
@test wordcount("one,two,three") == Dict("one" => 1, "two" => 1, "three" => 1)
The code I wrote outputs one concatenated word onetwothree
because there is no whitespace, thus the test fails.
I assume the expected solution is to replace punctuation with whitespace then split the words. I’m splitting first then removing the punctuation.