Looping with 'For'


#1

Now print out the numbers from 1 to 50 inclusive, using a for loop instead of an until loop.

for k in 1..50
print k
end

Oops, try again. It looks like you didn't print out the numbers 1 to 50, inclusive.

Am I doing something wrong here?


#2

Looks good to me, which exercise is it, what are the instructions?


#3

Hi,

This is excercise 16. Looping with 'For' in Loops & Iterators

I tried the same code and it just worked, the code I tried

for k in 1..50
    print k
end

Maybe you should refresh the page and try again? Or try to do the exercise in other browser.