Way to go - continue to the next lesson


#1

Why does the lesson constantly tell me "Way to Go" Click to continue to the next lesson?
when I get something wrong.
I get things wrong frequently and it always tellms me I did a good job and to continue???

As an addendum.
Now that I've gotten it to work (?) it is telling me:
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!).
This is my output:
what are you looking for?
the meaning of life
what do you want to redact?
life
the meaning of REDACTED ["the", "meaning", "of", "life"]


#3

If this is a question, then where is your code? We need to know how you generated the output (though it does look right). Please post the code so we can help.


#4

Details, details... sorry:

puts "what are you looking for?"
text = gets.chomp
puts " what do you want to redact?"
redact = gets.chomp
words = text.split(" ")
words.each do |word|
if word != redact
    print word + "  "
else
    print "REDACTED "
end
end

#5

The code works as expected and passes. Not able to reproduce the error.


#6

Hmm. OK Thanx. I guess it must be a bug


#7

@codepro49963 are you still getting the "oops try again" message? Or is your code passing?


#8

I started over and it finally worked. Apparently the system saves errors and doesn't forget them. Once I started over without mistakes it let me continue. That seems a little buggy, doesn't it?"
Anyway, thanx