Cursus Raku / Addendum 🆕 / Werken met gegevens / Tekst en strings / Exercises

Woordfrequentie

Opgave

Tel hoe vaak elk woord voorkomt in de zin the cat sat on the mat the cat. Druk één regel per woord af als woord: aantal, geordend op aantal van hoog naar laag, en alfabetisch wanneer de aantallen gelijk zijn.

Voorbeeld

Het programma drukt af:

the: 3
cat: 2
mat: 1
on: 1
sat: 1

Oplossing

Bekijk de oplossing

Cursusnavigatie

Oplossing: Palindroomcontrole   |   Oplossing: Woordfrequentie