Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Putting the Form in Formatter

Getting Input

Good! Now let's try something new. You may have noticed this weird little line of code repeated in our example:

variable_name = gets.chomp

gets is the Ruby method that gets input from the user. When getting input, Ruby automatically adds a blank line (or newline) after each bit of input; chomp removes that extra line. (Your program will work fine without chomp, but you'll get extra blank lines everywhere.)

Report a Bug
If you see a bug or any other issue with this page, please report it here.