It looks like you didn't print out the string 'Ruby!' 30 times


#1

counter = 0
loop do
counter += 1
print " Ruby!"
break if counter >= 30
end


Replace this line with your code.


#2

i believe ruby uses puts instead of print. check on that.


#3

I tried that also but no use


#4

I don't know if you found the problem already, but I think you can fix it by removing the space in the beginning of the string " Ruby!".


#5

Ruby uses both puts and print. puts put string includes a new line, print stays on the same line.

    5.times { print "Ruby!" }

Output

Ruby!Ruby!Ruby!Ruby!Ruby!

    5.times { puts "Ruby!" }

Output

Ruby!
Ruby!
Ruby!
Ruby!
Ruby!

#6

thank you, I wasn't aware! :slight_smile:


#7

I am having the same problem. I have tried it many different ways and it will not let me move on. I have even counted the number of times "Ruby!" was outputted to the console.


#8

The output should be scrunched up...

Ruby!Ruby!Ruby!Ruby!Ruby! ...