exercism / kotlin

Exercism exercises in Kotlin.
https://exercism.org/tracks/kotlin
MIT License
226 stars 194 forks source link

Description of Luhn problem is confusing #304

Open blueglyph opened 5 years ago

blueglyph commented 5 years ago

The main criterion is: "If the sum is evenly divisible by 10, then the number is valid."

It should be: "If the sum is divisible by 10, then the number is valid."

My first solution failed because I was verifying that sum%20 == 0, and I was wondering why "091" was supposed to be a valid number. I had some doubts about the "evenly divisible by 10" formulation, and a reference on the Luhn algorithm confirmed the problem.

=> Using ambiguous words in problem descriptions is dangerous, "evenly" means in even shares, but may also mean in a paired manner (even as opposite of odd) - two, four, ... shares of 10's (at least in my Oxford dictionary). The first example further supports that interpretation, unfortunately. That was obviously not the intent, and although the interpretation is arguable, the word "evenly" is simply not necessary in this case: I would remove it to avoid any possible confusion.

dector commented 5 years ago

Thanks, @blueglyph !

lathspell commented 4 years ago

According to https://en.wiktionary.org/wiki/evenly_divisible and https://math.stackexchange.com/questions/58555/what-is-meant-by-evenly-divisible it's common English so at least not wrong.

As it is on the other hand indeed unnecessary, it could be removed to help non-native speakers.

I would suggest to reassign this bug to "problem-descriptions". If the master description is changed then all language tracks and not only Kotlin's will update their descriptions automatically.