Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queues - Kayla Kubicke - Random Menu #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions random_menu.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#Creates 3 arrays
descriptor_1 = [
"Bubbly",
"Hot",
"Cold",
"Luke Warm",
"Spotted",
"Ethically Sourced",
"Farm to Table",
"Vegan",
"Locally Grown",
"Slippery"
]

descriptor_2 = [
"Fried",
"Charred",
"Blacken",
"Spicy",
"Yellow",
"Mild",
"Pickled",
"Hipster",
"Baked",
"Buttered"
]

food = [
"Beans",
"Cheese",
"Bread",
"Tofu",
"Crab",
"Salmon",
"Soup",
"Tomatoes",
"Bacon",
"Eggs"
]

#Creates line between command line and menu.
print "\n"

# Prints 10 random menu items.
for counter in 1..10
puts "#{counter}. #{descriptor_1[rand(0..9)]} #{descriptor_2[rand(0..9)]} #{food[rand(0..9)]}"
end

#Alternative loop - Prints 10 random menu items.

# 10.times do |counter|
# puts "#{counter}. #{descriptor_1[rand(0..9)]} #{descriptor_2[rand(0..9)]} #{food[rand(0..9)]}"
# end