Inspired by the upcoming winter bash event
Add a hat
` to a single vowel in each word of the input.
vowelmust be chosen at random. Each hat has to appear with the same probability (33%) and the vowels must have the same probability within the valid vowels in the word (if the word have 2 valid vowels each must be 50% likely to be chosen) - or the closest that your language has.
AEIOUaeiouare considered vowels (sorry
- Vowels with hats in the input DO NOT interfere with the rules (you can consider it as a consonant)
- If the input has no vowel it won't be modified
- Capitalization must be preserved.
rng ftw >
cat in the hat >
cât ìn thê hát
PROGRAMMING PUZZLES & code golf >
PROGRÂMMING PÚZZLES & codé gòlf
This is code-golf so the shortest code wins