Day 1.2 Exercise 2 Comments and Pound Characters

Here’s the link to my work on GitHub.
Here’s the link to the exercise 2.

Ex02 Code
Code for Exercise 2
Ex02 Shell
Output for Exercise 2

I have added a little bit more to this exercise. Line 11-15, I’ve added a multi-line comment. This is not recommended? I’m not sure why. In the Common student questions list, Zed didn’t reveal this on purpose.

Study Guide

1. Find out if you were right about what the # character does and make sure you know what it’s called  (octothorpe or pound character).
Yes, I’m right, it’s for commenting.

2. Take your ex2.rb file and review each line going backward. Start at the last line, and check each word in reverse against what you should have typed.
I believe he placed a : in line 6 on purpose. In many cases, I would have typed a . instead.

3. Did you find more mistakes? Fix them.
I believe I got it pretty well, although I still haven’t fully adapt to reading backwards.

4. Read what you typed above out loud, including saying each character by its name. Did you find more mistakes? Fix them.
I didn’t do it. But I should. I’m very impatient sometimes, I tend to read things without really reading them.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s