Stage 5


#1

puts "Text to search through"
text = gets.chomp
puts "Words to redact"
redact = gets.chomp

words = text.split(" ")

words.each do |word|
if word == redact
print "REDACTED!"
else print word + " "
end
end

whats wrong with my code


#2

The lesson is really, really, really picky about what is printed to the console. What you need is

print "REDACTED "

with a space afterwards, and no exclamation point.