-
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 - Bita #36
base: master
Are you sure you want to change the base?
Sockets - Bita #36
Conversation
Portmanteau GeneratorWhat We're Looking For
Great job overall! I've left a few comments inline where things could be cleaned up, but in general I am quite happy with this submission. Keep up the hard work! |
def is_vowel?(letter) | ||
if letter == "a" || letter == "e" || letter == "u" || letter == "o" || letter == "i" | ||
return true | ||
else |
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.
Could you shorten this up using .include?
?
end | ||
if i == 0 && k == 0 | ||
word_a = first_word | ||
else |
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 don't understand what k
is for in this code. I think you could take it out and get the same effect.
puts "please enter the second word:" | ||
second_word = gets.chomp | ||
until second_word.length >= 2 | ||
puts "please enter a word with more than one charactor:" |
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.
You have almost exactly the same code to get an input word from the user repeated here. Could you DRY this up with another method?
Portmanteau Generator
Congratulations! You're submitting your assignment.
Comprehension Questions
is_vowel?
method affect your project?