User talk:CalmoSoft/Find words which contains all the vowels: Difference between revisions

(Created page with "{{Draft task}} ;Task: Use the dictionary  [https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt unixdict.txt] Find the words wh...")
 
(Blanked this page as its contents have now been copied back to whence they came.)
 
(25 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Draft task}}

;Task:
Use the dictionary  [https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt unixdict.txt]

Find the words which contains all the vowels but each once.

The length of any word shown should have a length &nbsp; <big>'''>&nbsp; 10</big>.

=={{header|Ring}}==
<lang ring>
load "stdlib.ring"

cStr = read("unixdict.txt")
wordList = str2list(cStr)
num = 0
same = []
vowels = "aeiou"

see "working..." + nl

ln = len(wordList)
for n = ln to 1 step -1
if len(wordList[n]) < 11
del(wordList,n)
ok
next

for n = 1 to len(wordList)
flag = 1
str = wordList[n]
stra = count(str,"a")
stre = count(str,"e")
stri = count(str,"i")
stro = count(str,"o")
stru = count(str,"u")
strtmp = [stra,stre,stri,stro,stru]
ln = len(strtmp)
for m = 1 to ln
if strtmp[m] != 1
flag = 0
exit
ok
next

if flag = 1
num = num + 1
see "" + num + ". " + wordList[n] + nl
ok
next

see "done..." + nl

func count(cString,dString)
sum = 0
while substr(cString,dString) > 0
sum = sum + 1
cString = substr(cString,substr(cString,dString)+len(string(sum)))
end
return sum
</lang>
{{out}}
<pre>
working...
1. ambidextrous
2. bimolecular
3. cauliflower
4. communicable
5. communicate
6. consanguine
7. consultative
8. countervail
9. exclusionary
10. grandiloquent
11. importunate
12. incommutable
13. incomputable
14. insupportable
15. loudspeaking
16. malnourished
17. mensuration
18. oneupmanship
19. pandemonium
20. permutation
21. perturbation
22. portraiture
23. praseodymium
24. stupefaction
25. sulfonamide
done...

</pre>

Latest revision as of 09:35, 16 February 2021

Return to the user page of "CalmoSoft/Find words which contains all the vowels".