# Write some Random English

Given an odd integer input n greater than 1, generate a random English word of length n. An English word is one in which the odd (1-based) indices are consonants and the even (1-based) indices are vowels, the vowels being aeiou.

## Random

For the purposes of this challenge, you are to sample from the vowels and consonants uniformly, with replacement. In other words, each possible English word must be equally likely to appear as an output.

# Example Inputs/Outputs

3 -> bab, tec, yiq
5 -> baron, nariz, linog
7 -> murovay, fanafim


Winner:

Winner is the Lowest Byte Count.

Upvote your Favorite one, Top 3 Upvoted will be Honorable Mentions :P

• Welcome to the site. I don't really understand the challenge here. Maybe the sandbox (linked on the right), would be a good place to get feedback. – Wheat Wizard Feb 7 '20 at 19:19
• Are we making a function that generates the words? Or should the program simply generate them when run? – sugarfi Feb 7 '20 at 19:49
• Hi there. I've voted to close this as needing additional clarity, but do not fret when this gets closed! It's tough to get a challenge specified up to our standards the first few times you come up with one, so we have a sandbox for you to get feedback on them before they come to the main site. Hope you enjoy your time here, and happy golfing! – Giuseppe Feb 7 '20 at 20:46
• Be sure to specify what you mean by random. Also, how is the output size specified? Is it also random? – Luis Mendo Feb 7 '20 at 21:35
• I've gone ahead and edited it (and voted to re-open), please make edits to it as you feel appropriate! – Giuseppe Feb 12 '20 at 19:19

# 05AB1E, 14 11 bytes

-3 bytes thanks to Kevin Cruijssen

EžN¸žMšNèΩJ


Try it online!

• ¸ì can be š, .R can be Ω, and the } can be removed before the join. – Kevin Cruijssen Feb 10 '20 at 7:49
• oh wow, thank you! @KevinCruijssen – mabel Feb 10 '20 at 9:07

# Stax, 10 bytes

ÇÅφ⌠↑Ñ°↕Yx


Run and debug it

# Explanation

FVcVv2l@_@L

F           In range 1 to the input, do this ...
Vv         Vowels
Vc       Consonants
2l     Wrap the two inside a list
@    Index the constructed list into the counter
Note that the counter starts at 1,
so this picks the constants list
before the vowels list.
_@  Index by the current counter
(Stax doesn't have random number support)
L Wrap the whole stack into a list

• Wow, nice job on this one – Mister SirCode Feb 13 '20 at 12:17

# GolfScript, 36 bytes

,{['aeiou'.123,97>^]\2%=.,rand=}%''+


Try it online!

• You can save some bytes by using ['aeiou'.123,97>^] instead of your long string. Generates the characters 98-123, then removes the vowels. Plus, they're in two distinct arrays too, which saves you a bunch too. the string and 21/ can be removed, meaning you're down 31 chars and up 18, netting 13. ,{['aeiou'.123,97>^]\2%=.,rand=}%''+ This worked for me. – Mathgeek Feb 14 '20 at 14:18

# Perl 5, 69 bytes

say map{([a,e,i,o,u],[grep!/[eiou]/,b..z])[$_%2][rand$_%2*16+5]}1..<>


Try it online!

# Ruby, 76 bytes

Basic recursive function that adds a consonant and a vowel each time until there's only one character left, at which point it adds just the consonant.

f=->n{[*?b..?z].grep(/[^eiou]/).sample+(n<2?'':'aeiou'.chars.sample+f[n-2])}


Try it online!