0
This wonât work on SoloLearn đ˘
Why does this not work on Sololearn but it works in Repl (and in irb)? def check(x) if x == "Grr" return "Lion "   elsif x == "Rawr"    return "Tiger "   elsif x == "Chirp"    return "Bird "   else    return "Snake "   end end animals = gets.chomp.split(" ") for i in 0..(animals.count)-1  print check(animals[i]) end
3 Answers
+ 1
Sololearns codeplayground is not propperly devoleped yet
Or sl uses dif version of ruby
0
Iâve got it working now...I removed all the indents đđť
def check(x)
if x == "Grr"
return "Lion "
elsif x == "Rawr"
return "Tiger "
elsif x == "Chirp"
return "Bird "
else
return "Snake "
end
end
animals = gets.chomp.split(" ")
for i in 0..(animals.count)-1
print check(animals[i])
end