Redacted!

Woah this is getting a bit tricky I wonder is it my remote teaching fatigue, having four children remote learning at home, the wet weather or simply things are starting to ramp up! Today I redacted and use a .split method. But the big aaaahaaa moment was simply seeing strings and arrays and starting to get the idea of blocks. I panic here and there about where to put the next bit of code today my take away you can have blocks in blocks!

puts "Enter your word example"
text = gets.chomp
words =text.split(" ")
puts "Remove which word?"
redact = gets.chomp
words.each do |word|
if word == redact
print "REDACTED"
else
print word + " "
end
end

My code from todays codecademy I'm getting into REDACTED

Thought I might also tackle the additional question the first being about drop case but the others will have to wait- this beginner is flaking out with brain lockdown fatigue

Handwritten_notes