Skip to content

Instantly share code, notes, and snippets.

@huseyin
Created March 7, 2015 18:14
Show Gist options
  • Save huseyin/c5a48f44161e07033ce4 to your computer and use it in GitHub Desktop.
Save huseyin/c5a48f44161e07033ce4 to your computer and use it in GitHub Desktop.
Random kelimeler türet
# encoding: utf-8
veri = [ ]
kelimeler = [ :a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, :l,
:m, :n, :o, :p, :r, :s, :t, :u, :v, :y, :z, :x ]
boyut = gets.chomp.to_i
boyut.times do
rasgele = rand(23)
unless kelimeler[rasgele] == veri[-1]
print kelimeler[rasgele]
veri << kelimeler[rasgele]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment