Looping with for'


#1

for k in 1..50
print k
end
I don't know what is wrong with my code please help
all it says is Oops, try again. It looks like you didn't print out the numbers 1 to 50, inclusive.


#2

You forgot do after the declaration. First line:

for k in 1..50 do

#3

oh ok thanks il say if it works or not


#4

I did that but it stil.l wont work


#5

Try:

for k in 1..50 do |k|

#6

ok thanks
but it didn't work


#7

it still will not work


#8

clear all other code and it will