Thith Meanth War: How do I re-prompt the user if they didn't input anything?


I'm working on Thith Meanth War, and have been able to include all the other letters, but am unsure how to re-prompt a user? Do I just paste the same code into the first if statement?

Currently it just puts "please enter something" and the code ends.

print "How are you Daffy Duck?"
user_input = gets.chomp

if user_input.empty?
    puts "please enter something"
elsif user_input.include? "s" || "se" || "ce"
    user_input.gsub!(/s/, "th")
    user_input.gsub!(/se/, "th")
    user_input.gsub!(/ce/, "th")
    puts "hehe #{user_input}!"
    puts "Nothing to Daffify!"


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.