14/19


#1

The instruction are:

Use a while loop to print out the numbers 1 through 50, inclusive.
While the example above counts down, you will want to count up.
Use print rather than puts, and don't forget to increment your variable.

My code is:

i=0
while i <= 50 do
print i
i += 1
end

But it keeps telling me that "It looks like you didn't print out the numbers 1 to 50, inclusive."

What am I doing wrong?


#2

Your "i" is your starting point, right now your code is starting at 0 instead of at 1.
Change the i = 0 to i = 1 and then your code will work.