Skip to content

Conversation

@bcmdarroch
Copy link

Random Menu

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Would a hash work just as well as an Array in this project? Why? A hash would work just as well as an array in this project, particularly since the order of the words in each array does not matter. I would create a hash with the type of word (adjective, cooking style, food) as the key and the actual word as the value.
Did you find yourself repeating the same code? Why did you have to do it that way? In line 31-39, my loop requesting user input, I repeated 'print "Enter word"' and 'array << word' for each type of word. I did this because I wanted to make sure that each word went into the correct word-type array.
What type of loop did you use? Why did you choose that type? I used a .times loop so that I could accept user input of how many menu items there should be.
|

first version
those were just for testing
@kariabancroft
Copy link

Random Menu

What We're Looking For

Feature Feedback
Random Menu of 10 items displayed in the terminal. Yes! + allows the user to specify the number of items they want (and supply their own items)
Generator pulls one random item from each array to create menu items. Yes! + uses the delete method to remove it after it is displayed so there are not duplicates presented to the user
Baseline
Readable code with consistent indentation. Some room for improvement on your indentation, specifically on lines 20-21.
Extras
Nice job adding on some of the extras. It would be good to add some additional validation on the number the user enters so as not to end up with zero or a million menu items :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants