def t(x)rand(2)==0?x.upcase: x+['','\'','2'][rand(3)]end puts (0..15).map{|i|i%2==0?t("r"):t("u")}*" " def t define the function t rand(2) pick a random number from 0,1 ==0?x.upcase: x if the number is 0, turn the letter uppercase, if not leave as is + join onto this ['','\'','2'] create a list of the possible modifiers [rand(3)] pick a random one puts print to the screen (0..15).map{|i| from 0 to 15, do this ... i%2==0?t("r"):t("u") if the number is divisble by 2, call the function t with "r", if not, call it with "u" }*" " make that into a piece of text, seperated by " "