diff --git a/Analyse_de_frequence.py b/Analyse_de_frequence.py new file mode 100644 index 0000000..70c84e4 --- /dev/null +++ b/Analyse_de_frequence.py @@ -0,0 +1,10 @@ +nbLignes, nbMots = map(int, input().split(" ")) +histogramme = [0] * 101 +for loop in range(nbLignes): + mots = input().split(" ") + for idMot in range(nbMots): + longueur = len(mots[idMot]) + histogramme[longueur] = histogramme[longueur] + 1 +for longueur in range(101): + if histogramme[longueur] > 0: + print("{} : {}".format(longueur, histogramme[longueur])) \ No newline at end of file