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 - Natalia Kuleniuk - Random Menu #42

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

Queues - Natalia Kuleniuk - Random Menu #42

wants to merge 1 commit into from

Conversation

natalia-ku
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? No, array is better in my program, because I needed ordered access to my values by indexes; hash has random access to values, so hash do not work well with my program
Did you find yourself repeating the same code? Why did you have to do it that way? No, I tried my best not to repeat my code
What type of loop did you use? Why did you choose that type? I used until loop , that executes code until condition becomes true. This loop helps me to stop execution when user enters right number(<=10). Also, I used times loop to iterate through all arrays . I chose times loop with iteration variable that corresponds to current index of array. That helps me to have access to current value in array on each step of iteration

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                                                                              
Baseline
Random Menu of 10 items displayed in the terminal. Yes
Generator pulls one random item from each array to create menu items. Yes
Readable code with consistent indentation. Yes
Extras
Menu components are not repeated Yes
User can specify how many menu items to see Yes

Excellent work overall!

end
end

new_array = [] # To store new randomly-generated food items

Choose a reason for hiding this comment

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

new_array is not a particularly descriptive variable name. Can you think of something clearer to call it?

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