When “Tharah” became “Sarah”
So today was a .downcase!, .include? and .gsub! introduction. I am struggling with some of my ordering and recalling the simple things like adding a end after an if or else. With perserverance and concentrating- (a little hard with 4 children constantly interrupting) I managed to figure it out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "What is your sister's name?" | |
user_input = gets.chomp | |
user_input.downcase! | |
if user_input.include? "s" | |
user_input.gsub!(/s/, "th") | |
puts "Your sisters name is, #{user_input}!" | |
else | |
print "no s here!" | |
end |