Skip to content

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