Skip to content

Alena's Random Menu Generator #21

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

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

Conversation

Spatterjaaay
Copy link

Mood Analysis

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Would a hash work just as well as an Array in this project? Why? Hashes would not work specifically for my code, because I couldn't use the method .shuffle. But it could work if I tried to write the code differently.
Did you find yourself repeating the same code? Why did you have to do it that way? I did repeat a code when it came to user input. I asked three different input questions and then for each question created an array. This was, for me, the easier way how to create an array of user input, but I am sure there is a way how condense it.
What type of loop did you use? Why did you choose that type? I used a while loop to create an array of user input, because I wanted the user to control how many things he or she adds, I used a loop that doesn't have the number of iterations defined. The user broke the loop by doing something specific. Then I used a times loop (to print the number of menu items) that's dependent on the shortest array.

@kariabancroft
Copy link

Random Menu

What We're Looking For

Feature Feedback
Random Menu of 10 items displayed in the terminal. yep + allowing the user to specify how many items they want. Nice job checking to make sure that the value the user enters in is not greater than the smallest array length.
Generator pulls one random item from each array to create menu items. Nice job using the shuffle method to help randomize your array. Do you know what the difference is between shuffle and shuffle!?
Baseline
Readable code with consistent indentation. Code is nicely separated with whitespace as well as comments added for the more complex operations.
Extras
Nice job using a rescue statement when ensuring your user input is an Integer

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.

None yet

3 participants