Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Generate a pronounceable word

Ruby: 56 characters

([v=%w(a e i o u y),[*?a..?z]-v]*5).map{|a|$><<a.sample}

Example outputs:

  • itopytojog
  • umapujojim
  • ipagodusas
  • yfoqinifyw
  • ebylipodiz

Python, 81

from random import*
print''.join(map(choice,["bcdfghjklmnpqrstvwxz","aeiouy"]*5))

Good luck pronouncing them.


GolfScript, 32 characters

['aeiouy'.123,97>^]5*{.,rand=}%+

Run it online.

Tags:

Random

Code Golf

Natural Language

Generation

Related

Generate Skolem sequences Ratetod text fexir Delete those pesky ".DS_Store" files Convert to and from the factorial number system Evaluate the primorial of a number ASCII-visualize a graph Encode a program with the fewest distinct characters possible Evaluate the nth hyperoperation -ENDED- Do something that looks like something else Fault-Tolerant Hello World Print a string in as few distinct characters as possible Rock Paper Scissors

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy