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

Create random-menu.rb #18

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

Conversation

jacquelynoelle
Copy link

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? | Yes, but it would require more information. We'd have to create a value with numbers for each item anyway so we had a way to randomly select the items. One upside of a hash might be creating a boolean value for whether or not an item had been selected before - this would allow us to flag an item without deleting the information (I replaced words with 0 once they were chosen). |

| Did you find repetitions of the same or similar code? Why did you have to do it that way? | Originally I had repetitive code for the selection of words from the adjectives, cookstyles, and foods arrays, but I replaced that with a method after reviewing with my partner in class. |

| Did you use any loops? If so, how did it help solve a problem? | Yes, I used loops to: 1. populate the arrays, 2. To select items and make sure they hadn't been used already, and 3. to create the final menu. These were all repetitive tasks and using a loop allowed the user to control how many times they occurred by defining the menu size. |

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