Guest User

Untitled

a guest
Feb 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. # create three arrays with 10 items each:
  2. # first one is adjective
  3. # second one is cooking style
  4. # third one is foods
  5. # program should randomize food items on its own line
  6. # each food item is numbered 1. 2. ...
  7.  
  8. # creating the 3 arrays
  9.  
  10. adjectives = %w(sticky smoky spicy creamy crunchy crispy cheesy glazed flaky buttery)
  11. cooking_style = %w(deep-fried pan-fried smoked grilled roasted boiled baked braised caramelized seared)
  12. foods = %w(prime rib rice chicken pizza fish lamb vegetables potatoes bread noodles)
  13.  
  14. # randomizing arrays to create menu
  15.  
  16. 10.times do |i|
  17. random_adjectives = adjectives.sample
  18. random_cooking_style = cooking_style.sample
  19. random_foods = foods.sample
  20. puts "#{ i + 1 }. #{ random_adjectives } #{ random_cooking_style } #{ random_foods }"
  21. end
Add Comment
Please, Sign In to add comment