Use two dots between numbers to include both numbers in the range and three dots to exclude the latter.
(1..3).to_a => [1, 2, 3]
(1...3).to_a => [1, 2]
See more on ranges.
You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.