16
3
The challenge is simple:
generate a word.
Specifications:
- Word must be pronounceable.
- This is defined as "alternating between a consonant and a vowel."
- A consonant is one of the following letters:
bcdfghjklmnpqrstvwxz
- A vowel is one of the following letters:
aeiouy
- Word must be randomly generated.
- Words must be able to contain every consonant and vowel. (You can't just use
bcdf
for consonants andaei
for vowels.) - Word must contain 10 letters.
- Shortest code (in character count) wins.
Would something like this be allowed ? alert('abecidof'+'uy'[Math.round(Math.random())]+'ghijklmnpqrstvwxz'[Math.round(Math.random()*19)]); – dwana – 2015-02-16T15:05:32.587
1@Kartik depends on the context, in 'yes' it's a consonant, in 'why' it's a vowel, but this would make it impossible to define a pronounceable word as alternating between vowels and consonants, eg. yyyyyyyy would be a valid word. – CJStuart – 2015-02-17T22:30:14.103
1http://codegolf.stackexchange.com/questions/11215/alien-name-generator – John Dvorak – 2013-06-18T04:43:16.683
@JanDvorak Okay... what does that have to do with this? – Doorknob – 2013-06-18T22:15:40.343
7
With this xkcd strip in mind, the program
– AardvarkSoup – 2013-06-23T22:02:58.387echo buxitiwymu
technically conforms to the specification. I assure you, I generated the word randomly:P1@AardvarkSoup "Words must be able to contain every consonant and vowel" – Doorknob – 2013-06-23T22:52:34.537
@Ragnagord No, it won't. But,
yyyyyyyyyy
would. – Erik the Outgolfer – 2016-09-28T17:42:22.1931I actually made a generator on Scratch a while back. It had specific rules for when you can treat
y
as a vowel, where you can useq
andx
, and when you can use two-letter combinations likeng
orea
– Esolanging Fruit – 2016-11-06T21:42:02.077y
is a vowel !? – Kartik – 2013-09-16T15:13:36.517