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

Rand_Menu #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Rand_Menu #17

wants to merge 2 commits into from

Conversation

SelamawitA
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?
A hash would work in this code, instead of having 3 parallel arrays. An update to the code could be made to use a single hash to store all food/texture/style. Keeping track of and printing from a single data structure would be more simple than consciously printing from 3 separate arrays. Also, having symbols to read from instead of index variables (like i in my case) would be more readable to the next coder who looks through the program.

| Did you find yourself repeating the same code? Why did you have to do it that way? | |
Yes, when I thought about the different ways a user could interact with the program, I found myself
repeating very similar lines or in many cases the exact same code. Right now, I use these methods because they are the one's I'm most aware of.

| What type of loop did you use? Why did you choose that type? | |
I used a times loop in cases where I had a fixed amount of iterations I wanted a loop to execute and that number was known. I used a while loop in cases where the condition of the loop was not known to be true until the variable was assigned by the user.

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