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 - Cara Comfort - Random Menu #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cecomfort
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? No, since I made a list of items for each food or food descriptor. It would not make sense to make each food descriptor a key to map to a value.
Did you find yourself repeating the same code? Why did you have to do it that way? Yes, had to shuffle each of the three arrays
What type of loop did you use? Why did you choose that type? I chose a times iterator, since it made accessing each element in my array very easy and systematic in that each iteration represented an array index.

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

Good work overall!

]

# Randomly rearranges the order of the elements in each array
adjs = adjs.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