16. Looping with 'For'


#1

i = 1
while i <=51 do
print i
i +=1
end
i = 1
until i < 51
print 1
i +=1
end
for k in 1..50
print k
end

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

Can Somebody HELP me PLEASE it's been a week :frowning:


#2

Can you take a screenshot or paste it into http://pastebin.com/ so the code is easy to debug?


#3


#4

Ok so they just want you to use a "for loop"

It's deceptively simple - here is my code in syntax: http://pastebin.com/9nnLKPkD


#5

explanation: for the variable "i" in the set of numbers between 1 and 50, set i to be the first number, print the number, then add 1 to the number and repeat until finished with the set.