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

Queues - Hyunji Kim - Random Menu #50

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

Conversation

ricecakemonster
Copy link

Random Menu

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Would a hash work just as well as an Array in this project? Why? If you want to store generated menu in one place, hash would be very useful. I just printed the menu, so I didn't need to use a hash.
Did you find yourself repeating the same code? Why did you have to do it that way? I had to make my code to select adjective, cooking style, and food randomly and individually. I didn't want it to be first adjective + first cooking style + first food. I had to repeat the same code three times to achieve that.
What type of loop did you use? Why did you choose that type? times. Because I know how many menu items to generate(user input) and unique adjective, cooking style and food should be selected for each menu item. It makes me sense to use times to repeat the code as many times as the number of menu items.

Copy link

@droberts-sea droberts-sea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random Menu

What We're Looking For

Feature Feedback                                                                              
Random Menu of 10 items displayed in the terminal. yes
Generator pulls one random item from each array to create menu items. yes
Baseline
Readable code with consistent indentation. mostly - see inline comments
Extras
Menu items are not repeated
User can specify how many menu items to see

Good work! That's a good solution to the BBQ problem.

num1 = rand(i)
style = cook_style[num1]
# For BBQ(all upper case)
if style.is_lower?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Watch your indentation - this should be at the same level as the line above.

i -= 1
end

10.times do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this bit of code for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have deleted this code. my mistake!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants