Stuck on counting from 1 to 50


please help. I am stuck on this same one.
I am trying the following code and it counts starting at 1 and goes up in increments of 1 until it hits 50

here is my code
i= 1
while 1 <= 50
print i
i +=1

Ruby Looping with "While"

Which exercise is this? Please post a link. Thanks.

sorry here you go


I really appreciate the help. please let me know if there is anything else I need to provide. I believe I have it all included though.




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.

Your code has a number, 1, where it should have, i.

while i <= 50



thanks! Dyslexia is making this so dang hard for me haha. Thank you so much!!!


I know where you are coming from. Spent a lifetime overcoming and compensating for that challenge. Things just take longer, and require constant rechecking. At the end of the day, we can still learn right along with the rest. Personally, I think that people who live with challenges in their lives end up stronger for it, and perhaps a little more empathetic than the next guy.


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