Jump to content

Find words which contains more than 3 e vowels: Difference between revisions

strengthened testing for requirements.
(→‎{{header|REXX}}: added the computer programming language REXX.)
(strengthened testing for requirements.)
Line 4:
Use the dictionary   [https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt unixdict.txt]
 
Find words which contains more than three   '''e'''   vowels   ''and''   contains only   '''e'''   vowels.
<br><br>
 
Line 25:
say copies('─', 30) # "words in the dictionary file: " iFID
finds= 0 /*count of the "eeee" words found. */
vowels= 'aeiou'; /*obtain the list of the other vowels. */
upper vowels /*uppercase all the other vowels. */
vowels= space( translate( vowels, , chrU), 0) /*elide the one particular vowel. */
 
do j=1 for #; $= @.j /*process all the words that were found*/
upper $ /*uppercase it for caseless finds. */
if pos(chrU, $)==0 then iterate /*At least 1 vowel found? No, then skip*/
if verify(vowels, $, 'M')>0 then iterate
if countstr(chrU, $) < many then iterate /*Have enough vowels? " " " */
finds= finds + 1 /*bump the count of "ABC" words found. */
Line 38 ⟶ 42:
<pre>
────────────────────────────── 25104 words in the dictionary file: unixdict.txt
accelerometer
belvedere
betelgeuse
centerpiece
cheerleader
cheesecake
decelerate
degenerate
dereference
desegregate
electroencephalogram
electroencephalograph
electroencephalography
elsewhere
entrepreneur
entrepreneurial
ephemerides
erlenmeyer
evergreen
everywhere
exegete
experience
eyepiece
freewheel
genevieve
heterogeneity
heterogeneous
inexperience
interference
interferometer
interviewee
irredeemable
leeuwenhoek
minesweeper
nevertheless
perseverance
persevere
preference
referee
refereeing
reprehensible
representative
reverberate
seventeen
seventeenth
speedometer
squeegee
steeplechase
teleconference
telemeter
teletypesetting
teletypewrite
tennessee
────────────────────────────── 5516 "e" words found using the characters: 4 'e'
weatherbeaten
wheresoever
────────────────────────────── 55 "e" words found using the characters: 4 'e'
</pre>
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.