this is my code puts "Text to search through: " text = gets.chomp puts "Word to redact: " redact = gets.chomp words = text.split(" ") words.each do |word| if word == redact print "REDACTED " else print word + " " end end
I keep getting the following message:
Oops, try again. Make sure to print each word from the user's text to the console unless that word is the word to be redacted; if it is, print REDACTED (all caps!).
what am i doing wrong? pls help