R.i.p


#1

puts "text"
text = gets.chomp
puts "redact"
redact = gets.chomp
words = text.split(" ")
words.each do |word|
if word == redact
print "REDACTED "
else
print word + " "
end
end


#2

Is anyone going to help me...


#3

I just started recently so I found this a bit late, but if you're still having trouble try this;

if word != redact
    print word + " "
else
    print "REDACTED "

end
end

You want to try arguing if word does not include redact first, otherwise it will just return the string.