Complete the code to start an infinite repeat loop.
repeat [1] { print("Hello") break }
Complete the code to break out of the repeat loop when x is greater than 5.
x <- 1 repeat { if (x [1] 5) break print(x) x <- x + 1 }
Fix the error in the repeat loop to correctly increment x and break when x equals 3.
x <- 0 repeat { x <- x [1] 1 if (x == 3) break print(x) }
Fill both blanks to create a repeat loop that prints numbers 1 to 4 and breaks after.
x <- 1 repeat { print(x) x <- x [1] 1 if (x [2] 5) break }
Fill all three blanks to create a repeat loop that sums numbers from 1 to 5 and breaks after.
sum <- 0 x <- 1 repeat { sum <- sum [1] x x <- x [2] 1 if (x [3] 6) break } print(sum)
