Jump to content

Find words which contains all the vowels: Difference between revisions

Added Python implementation
(Added Python implementation)
Line 701:
<pre>
25 words: ambidextrous bimolecular cauliflower ... praseodymium stupefaction sulfonamide
</pre>
 
=={{header|Python}}==
Tested on Python 3+, the file download will work only if the link is still active. It is possible that you may be able to fetch the file in your browser but download via code may still fail. Check whether you are connected to a VPN, it works on open networks.
<lang Python>
import urllib.request
from collections import Counter
 
urllib.request.urlretrieve("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt", "unixdict.txt")
 
dictionary = open("unixdict.txt","r")
 
wordList = dictionary.read().split('\n')
 
for word in wordList:
if len(word)>10:
frequency = Counter(word.lower())
if frequency['a']==frequency['e']==frequency['i']==frequency['o']==frequency['u']==1:
print(word)
</lang>
{{out}}
<pre>
ambidextrous
bimolecular
cauliflower
communicable
communicate
consanguine
consultative
countervail
exclusionary
grandiloquent
importunate
incommutable
incomputable
insupportable
loudspeaking
malnourished
mensuration
oneupmanship
pandemonium
permutation
perturbation
portraiture
praseodymium
stupefaction
sulfonamide
</pre>
 
503

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.