1
Your Goal:
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
4Welcome 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. – Post Rock Garf Hunter – 2020-02-07T19:19:40.173
Are we making a function that generates the words? Or should the program simply generate them when run? – sugarfi – 2020-02-07T19:49:46.940
7
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 – 2020-02-07T20:46:21.6304
Be sure to specify what you mean by random. Also, how is the output size specified? Is it also random?
– Luis Mendo – 2020-02-07T21:35:01.780Some questions for clarification: (1) does this take input, and if so, what is the input and how exactly does it affect the output? (2) What is meant by random? Do we select vowels and consonants with replacement, so
bab
andbabab
would each be possible, or without? Does each word generated this way have equal chance of being generated, or does each word have to have a non-zero probability of appearing, or is there some other specific, well-defined distribution you're looking for? I see Luis has asked basically the same questions, but you have not yet addressed them in any way. – Giuseppe – 2020-02-10T18:12:45.083@Giuseppe no extra details needed... Thats what I meant. I wanted to see who could create vowel and non vowel random words in the least amount of bytes. See the number one answer, they did it right. – TaylorS – 2020-02-12T17:01:31.213
We have some guidelines on things to include in your challenge. If you'd like, I'd be happy to edit this question up to our standards (with your input, of course) so we can get this re-opened and get some upvotes on it! I haven't downvoted it because I think it's a good challenge; it just needs some refinement and it should get a decent amount of attention.
– Giuseppe – 2020-02-12T19:13:00.8131I've gone ahead and edited it (and voted to re-open), please make edits to it as you feel appropriate! – Giuseppe – 2020-02-12T19:19:31.023
Reminds me of this challenge. Main difference being that this takes length as input. Actually, I'm not sure if that makes this a dupe or not. – Value Ink – 2020-02-14T06:59:04.717
@ValueInk He wants pronouncable words, and y itsnt a vowel, but he includes it anyways. Your able to merge AEIOU and its actually a pronouncable sound, with Y it adds an extra sectional sound, its incorrect – TaylorS – 2020-02-14T15:56:48.423