Multiple choice technology programming languages

0.upto(10) { |i| puts i} Output will be=> 0 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 upto method in Ruby is inclusive, meaning 0.upto(10) iterates from 0 through 10, printing each value. The output 0 1 2 3 4 5 6 7 8 9 10 is exactly correct. This demonstrates the inclusive nature of Ruby's range methods.