Why won't it work!


#1

please help! I looked around but can't get my code right! :angry: I'm doing Ruby, 9. next!

1 = 20
loop do
i -= 1
next if i % 2 == 1
print "#{i}"
break if i <= 0
end

I keep getting this "Oops, try again. Make sure to replace the ___s with the appropriate keywords!"
what is wrong!


#2

Hi first you put 1 = 20 instead of i = 20 and your next if sould be like that next
next if i % 2 != 0


#3

thanks for the help :smile:


#4

I tried this but it still wont work.


#5

Hi can you post your code and the error you get?