Raku-Kurs / Anhang 🆕 / Arbeiten mit Daten / Text und Zeichenketten / Exercises

Worthäufigkeit

Aufgabe

Zählen Sie, wie oft jedes Wort im Satz the cat sat on the mat the cat vorkommt. Geben Sie eine Zeile je Wort als wort: anzahl aus, geordnet nach Anzahl von der höchsten zur niedrigsten und bei gleicher Anzahl alphabetisch.

Beispiel

Das Programm gibt aus:

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

Lösung

Siehe die Lösung

Kursnavigation

Lösung: Palindromprüfung   |   Lösung: Worthäufigkeit