-
Notifications
You must be signed in to change notification settings - Fork 50
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
Sockets - Shubha #28
base: master
Are you sure you want to change the base?
Sockets - Shubha #28
Conversation
Uses a different approach to get indexes for slicing
version includes optional enhancements
Grade the one that's named generator.rb please! :) I uploaded the other files just so I could have them in my repo. |
Portmanteau GeneratorWhat We're Looking For
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! In the future, just turn in your most-complete version, as I use a tool to help me grade. I didn't know you had 3 files in here until I looked on github!
# test_consonant = "g" | ||
# puts "Is #{test_consonant} a vowel?" | ||
# puts is_vowel?(test_consonant) | ||
# puts "in the run_generator method" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would delete this dead code! It just muddies the waters when someone goes to look through it.
# is_vowel checks to see if a specific character is a vowel | ||
def is_vowel?(letter) | ||
vowels = ["a", "e", "i", "o", "u"] | ||
if vowels.include?(letter.downcase) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice trick!
end | ||
|
||
# is_vowel checks to see if a specific character is a vowel | ||
def is_vowel?(letter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, personal style note, I'd move this function to the top of the code, because it gives context to what happens in your main program. Remember, your jobs are to 1) make it work good and 2) make it as easy to grok as possible.
Portmanteau Generator
Congratulations! You're submitting your assignment.
Comprehension Questions
is_vowel?
method affect your project?