Skip to content

Instantly share code, notes, and snippets.

@superacidjax
Created October 12, 2015 12:06
Show Gist options
  • Save superacidjax/8a0f95579067bb43096c to your computer and use it in GitHub Desktop.
Save superacidjax/8a0f95579067bb43096c to your computer and use it in GitHub Desktop.
Lesson 1
# Exercise 1: A Good First Program
In Sublime, create a new file, call it ```lesson_1.rb```
Type the following text
```puts "Hello World!"```
```puts "Hello Again"```
```puts "I like typing this."```
```puts "This is fun."```
```puts "Yay! Printing."```
```puts "I'd much rather you 'not'."```
```puts 'I "said" do not touch this.'```
In iTerm2, navigate to the directory in which you are storing your work. Then type in
```ruby lesson_1.rb```
You should see output like this:
```Hello World!```
```Hello Again```
```I like typing this.```
```This is fun.```
```Yay! Printing.```
```I'd much rather you 'not'.```
```I "said" do not touch this.```
##Extending your learning
Do the following:
Make your program print another line of text.
Make your program print only one of the lines.
Put a # (octothorpe) character at the beginning of a line. What did it do?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment