print "Hackney Downs" user_input == gets.chomp user_input.downcase! if user_input.include? "s" user_input.gsub!(/s/, "th") else puts "There are no s's here!" end
Don't have double equal signs. (
user_input = gets.chomp.downcase)
This is what your code should look like:
print "Hackney Downs"
user_input = gets.chomp.downcase!
if user_input.include? "s"
puts "there are no s' here!"
You have to have an Upper Case letter in your string so that .downcase! has something to return, otherwise it stuffs up the .include method.
Hope this helps.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.