16. Looping with 'For'


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

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:


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



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


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.