Skip to content

Conversation

@leannerivera
Copy link

@leannerivera leannerivera commented Aug 7, 2018

Random Menu Generator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
For the places where arrays were used, could using a hash work? Could it work easily? Why or why not? I think that hashes would work, but I don't think they'd be more useful than an array for this program because the items are randomized. I think it'd be more useful if we were describing qualities of a dish .
Did you find repetitions of the same or similar code? Why did you have to do it that way? Yes. I don't think I had to do it that way. In one case I created a method to prevent too many repeats, but there is still repetition when asking for user input. I think that there can be a method for that so it only needs to be typed once in the code.
Did you use any loops? If so, how did it help solve a problem? Yes. If a user inserts too many items (outside of the # they provided) I used an until loop to remove that last item of the array until its length matches the # of items user submitted. I also did an until loop to prevent users from inputting anything that does not match a number above 0 and continue asking until criteria is met. Also it's not a direct loop but I call the replace_array method again in the method if the list items come up short, so it will always check to see if criteria is met every time a user types.

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.

1 participant