From daf951b9907a6329f1d9991437c850125e97ef54 Mon Sep 17 00:00:00 2001 From: marisol-lopez Date: Thu, 9 Feb 2017 09:40:07 -0800 Subject: [PATCH 1/2] Create random_menu.rb --- random_menu.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 random_menu.rb diff --git a/random_menu.rb b/random_menu.rb new file mode 100644 index 0000000..e516621 --- /dev/null +++ b/random_menu.rb @@ -0,0 +1,16 @@ +#3 arrays with different food adjectives, cooking style, and types + +food_adjectives = ["hot", "soft", "small", "soggy", "watery", "crispy", "burnt", "slimey", "creamy", "greasy"] +cooking_styles = ["steamed", "grilled", "baked", "roasted", "boiled", "fried", "barbequed", "microwaved", "stir-fried", "poached"] +different_foods = ["chicken", "steak", "salmon", "dumplings", "pizza", "tacos", "sandwiches", "pasta", "cake"] + +#index so that it'll print a new number within loop +index = 1 + +puts "\nHere is your specialized menu.\n\n" +#running through the number of elements in food_adjectives array +10.times do + #used string interpolation to print menu + puts "#{index}. #{food_adjectives.delete_at(rand(food_adjectives.length))} #{cooking_styles.delete_at(rand(cooking_styles.length))} #{different_foods.delete_at(rand(different_foods.length))}" + index += 1 +end From fcf0efdc03e82d817c5127bda8fa6519416e36c2 Mon Sep 17 00:00:00 2001 From: marisol-lopez Date: Thu, 9 Feb 2017 09:43:45 -0800 Subject: [PATCH 2/2] Update random_menu.rb --- random_menu.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/random_menu.rb b/random_menu.rb index e516621..ccae19b 100644 --- a/random_menu.rb +++ b/random_menu.rb @@ -2,7 +2,7 @@ food_adjectives = ["hot", "soft", "small", "soggy", "watery", "crispy", "burnt", "slimey", "creamy", "greasy"] cooking_styles = ["steamed", "grilled", "baked", "roasted", "boiled", "fried", "barbequed", "microwaved", "stir-fried", "poached"] -different_foods = ["chicken", "steak", "salmon", "dumplings", "pizza", "tacos", "sandwiches", "pasta", "cake"] +different_foods = ["chicken", "steak", "salmon", "dumplings", "pizza", "tacos", "sandwiches", "pasta", "cake", "tofu"] #index so that it'll print a new number within loop index = 1