Example of upto that prints out a times table for 2
1.upto(12) { |i| print "2 x " + i.to_s + " = ", i * 2, "\n"}