Skip to content

Conversation

@TamikoT
Copy link

@TamikoT TamikoT commented Feb 9, 2017

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? Yes, you can create a hash that has the array indices as the key because that's essentially what an array is.
Did you find yourself repeating the same code? Why did you have to do it that way? I found myself repeating the .shuffle! for each array. I did it this way so that each part of the menu would be randomized seperately.
What type of loop did you use? Why did you choose that type? I used a times loop that was user-defined. It seemed to be the clearest way of asking the user for how many items and then printing based on what they entered.

Copy link

@droberts-sea droberts-sea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random Menu

What We're Looking For

Feature Feedback                                                                              
Baseline
Random Menu of 10 items displayed in the terminal. Yes
Generator pulls one random item from each array to create menu items. Yes
Readable code with consistent indentation. Yes
Extras
Menu components are not repeated Yes
User can specify how many menu items to see Yes

Excellent work overall! I laughed at your very Seattle food choices.

# replace each array with shuffled array
descriptor.shuffle!
meat.shuffle!
pairing.shuffle!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of shuffle! This is a clever way to get a random order without destroying the array as you go along.

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.

2 participants