random_menu_Tamira #36
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Random Menu
Congratulations! You're submitting your assignment.
Comprehension Questions
| 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 stored the menu items in a hash. For example the keys could have been numbers and the values could have been my menu items. |
| Did you find yourself repeating the same code? Why did you have to do it that way? | The only code that I repeated was in the enhanced version where I wrote three times loops to fill the arrays for menu items. I could have combined this into a single times loop, but I liked filling each array one at a time instead of cycling though them. |
| What type of loop did you use? Why did you choose that type? | I used times loops and counter controlled loops. I used the times loops because I knew how many times I wanted to run though those loops to fill in the menu items. I used counter controlled loops to get the user input for how many menu items they wanted to see, as well as for generating the random menu. This is because I wanted to use the counter variable in my loops, and I couldn't predict in advance how many times the loops would need to run. |