Agility Kata "Word Count VIII"

Optionally, the text can be compared with a dictionary of known words. When the index is printed, it marks words not found in the dictionary with an asterisk and indicates the number of unknown words, e.g.

$ wordcount -index -dictionary=dict.txt
Enter text: Mary had a little lamb
Number of words: 4, unique: 4; average word length: 4.25 characters
Index (unknown: 2):
had
lamb*
little
Mary*
$

The file dict.txt looks as follows:

big
small
little
cat
dog
have
has
had
en_USEnglish

Vorherige Iteration bearbeitet?

Du öffnest gerade eine Agility Kata. Hast du den vorhergehenden Teil bereits bearbeitet?

Bitte öffne diese Übung nur, wenn du die vorhergehenden Teile bereits bearbeitet hast. Die Idee der Agility Katas ist es, zusätzliche Anforderungen an bestehendem Code zu implementieren. Wenn du dir zuerst alle Anforderungen anschaust, geht der Effekt der Agility Katas verloren.

Inkremente