×

ruby · level 1 · unit 1 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Lines run in order, one after another.

A program can have lots of lines. Ruby runs them in order, top to bottom, like ticking off a shopping list. Everything your program shows on the screen is called its .

puts shows its string, then moves to a new line. shows its string and stays where it is, so the next message carries on along the same line.

A puts with nothing after it has nothing to show, so you get a blank line. It is handy for spacing things out.

print "Ready, "
print "steady, "
puts "go!"
puts
puts "Off they run!"

print adds no spaces, so put a space inside the quotes when you want a gap.