15. Looping with until


So here is a lesson link: https://www.codecademy.com/courses/ruby-beginner-en-XYcN1/3/2?curriculum_id=5059f8619189a5000201fbcb

instruction is to print numbers from 1 to 50, inclusive way. Here is my code:

i = 1
until i == 50 do
    puts i
    i += 1

It counts from 1 to 49. Than I change i to 51, and it shows numbers from 1 to 50, but still says that "It looks like you didn't print out the numbers 1 to 50, inclusive." I'm really stuck, please help, what is wrong with this code?

It's the same if I change puts with print.


There is a difference between puts and print.


Thanks, Yaa I know that there is a difference, but thought that it not important it this case.


It's very important in this case because the instruction wants it.
also you have to change the i from 50 to 51 what you did before but that time there was puts.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.