3/17 Loop the Loop with Loop MAJOR PROBLEMS


#1
j = 0

loop do
     j += 1
    print "Ruby"
    break if j > 30
end

I do not see what is wrong with this code. It says I didn't print out Ruby thirty times but the code looks fine.


#2

@dragonviv2,

Use the following code
to have an idear how many times you printed "Ruby".

j = 0

loop do
     j += 1
    print "Ruby-#{j}"
    break if j > 30

end

If you corrected the used operator in your IF statement
you will have to read the Instruction carefully....!!!


#3

I finally figured this one out. In the hint it shows "Ruby", but look closely at the instructions, you need "Ruby!" with an exclamation point.


#4

this is the right code ( Hint computers count form 0 so thats why its 29 and not 30

j = 0

loop do
j += 1
print "Ruby!"
break if j > 29

end


#5

j = 0

loop do
j += 1
print "Ruby!"
break if j > 29

end
it works properly ..try it


#6

this code worked

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


#7

i was getting frustrated too! but i figured out that they wanted us to print "Ruby!" not just "Ruby"