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

Queues - Kayla Kubicke - Random Menu #46

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost 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? I would need to think about that a bit so this many not be correct but, I do not think so. I think using an array is the easiest solution. But, a hash would cut down the amount of code used. Honestly, I would need more time to think about it.
Did you find yourself repeating the same code? Why did you have to do it that way? At first I did have repeating variables that created random numbers. I worked very hard to create a solution that removed this but I did not figure it out in time even though I (think?) I conceptually understood what needed to be done. So, I ended up repetitively using 'rand(0..9)'. I need to think about a better solution.
What type of loop did you use? Why did you choose that type? I used a for loop because it allowed me to iterate over a specific number of times easily. I am also very comfortable with using for loops.

@droberts-sea
Copy link

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

Good work!

Regarding the for loop:
The for loop is a perfectly valid way to solve this problem. Coming from a C background, I also used to be much more comfortable with for loops than with enumerables like each or times. However, I've found that enumerables can produce very clean readable code, and I definitely encourage you to get to know them well.

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.

1 participant