Looping with while problems


#1

This is my code

i = 1
while i >= 50 do
    print i
    i += 1
    
end

I need to get it to 50 inclusive, but I don't know how

https://www.codecademy.com/en/courses/ruby-beginner-en-XYcN1/3/1?curriculum_id=5059f8619189a5000201fbcb

Can anyone help?


#2

You have a greater than sign instead of a less than sign,

as you are checking if i is less then 50


#3

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