Find words which contain the most consonants: Difference between revisions
Find words which contain the most consonants (view source)
Revision as of 06:33, 28 December 2022
, 1 year agoAdded 11l
(FutureBasic solution added) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 11:
{{Template:Strings}}
<br><br>
=={{header|11l}}==
{{trans|Python}}
<syntaxhighlight lang="11l">
V lines = File(‘unixdict.txt’).read().split("\n")
V words = lines.filter(w -> w.len > 10 & !re:‘[^a-z]’.search(w))
DefaultDict[Int, [String]] good
L(word) words
V c = word.replace(re:‘[aeiou]’, ‘’)
I sorted(Array(c)) == sorted(Array(Set(Array(c))))
good[c.len].append(word)
L(k, v) sorted(good.items(), reverse' 1B)
I v.len > 30
print(k‘: ’v.len‘ words’)
E
print(k‘: ’sorted(v).join(‘ ’))
</syntaxhighlight>
{{out}}
<pre>
9: comprehensible
8: 39 words
7: 130 words
6: 152 words
5: acquisition acquisitive acrimonious ceremonious deleterious diatomaceous egalitarian equilibrate equilibrium equinoctial expeditious hereinabove homogeneous inequitable injudicious inoperative inquisitive interviewee leeuwenhoek onomatopoeic radioactive requisition
4: audiovisual bourgeoisie onomatopoeia
</pre>
=={{header|Action!}}==
|