Complete the code to create a range from 1 to 5 inclusive.
range = 1 [1] 5 puts range.to_a
The .. operator creates a range including the end value.
Complete the code to create a range from 1 to 5 excluding 5.
range = 1 [1] 5 puts range.to_a
The ... operator creates a range excluding the end value.
Fix the error in the code to create a range from 'a' to 'e' inclusive.
letters = 'a' [1] 'e' puts letters.to_a
Use the inclusive range operator .. to include 'e' in the range.
Fill both blanks to create a range from 10 to 20 excluding 20 and print its array.
range = 10 [1] 20 puts range.[2].to_a
to_s instead of to_a to convert the range.Use the exclusive range operator ... to exclude 20, and to_a to convert the range to an array.
Fill all three blanks to create a range from 'm' to 'r' inclusive, convert it to an array, and print it.
letters = 'm' [1] 'r' array = letters.[2] puts array.[3]
puts directly on the range without conversion.Use .. for inclusive range, to_a to convert to array, and join to print as a string.
