Multiple choice technology programming languages

i = 0 10.times do i += 1 puts i End The output will be => 1 2 3 4 5 6 7 8 9 10

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The code initializes i = 0, then uses 10.times do which executes the block 10 times. Each iteration increments i by 1 and prints it, producing output from 1 to 10. This is correct Ruby syntax and the claimed output matches the actual behavior.