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

create random_menu #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

create random_menu #26

wants to merge 2 commits into from

Conversation

tanham
Copy link

@tanham tanham commented Aug 10, 2017

Random Menu

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
How did you store menu components? Why? I used arrays because I wanted to be able to iterate through them
Could you have stored components using a different data structure? For example, if you used an Array could you have used a Hash? I could have used an array of hashes and iterated over that
Did you find yourself repeating the same code? Why did you have to do it that way? I don't think I repeated code much but I could be wrong
What type of loop did you use? Why did you choose that type? I used a times loop because I wanted my loop to repeated for a specific number of times

@PilgrimMemoirs
Copy link

Random Menu

What We're Looking For

Feature Feedback
Random Menu of 10 items displayed in the terminal. Well done!
Generator pulls one random item from each array to create menu items. Well Done!
Baseline
Readable code with consistent indentation. Well Done
Extras
Do you need to set the variable 'n'? Have a look at the docs for the .times method (https://ruby-doc.org/core-2.2.2/Integer.html#method-i-times). What else could you use with that method that would give you a number to work with? hint: it's between the pipes! How could you refactor this solution to utilize that functionality that is already available to you with that method?
Comprehension Q's How could you have used an array of hashes? I'm curious what that would look like and how that improve the functionality of this program. I would like to see that thought expanded more on so I know what exactly you are thinking. The answers to these comprehensive questions can be as long as you like :)
I do notice a large chunk of code being repeated twice, where you are puts the list of menu items. Because code is ran top-down, how could you refactor to have the items print after all user input is given, without needing to be contained within the if statements themselves?
Submission meets project expectations and learning goals. Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants