First, check to see if the folder that you want to create already exists using 'ls'.
ls
pushd pwd mkdir clear (cmd+k) cat
First, check to see if the folder that you want to create already exists using 'ls'.
ls
pushd pwd mkdir clear (cmd+k) cat
| This is a block of text | |
| #!This is a block of code | |
| This is a github highlighted codeblock | |
| # |
#Homework for June 18, 2013
##Calculator 1 Create a command line calculator. It should have a basic and advanced mode.
basic calculator (+, -, *, /) advanced calculator (exponents, square root)
For a basic calculator, press 1.
#Homework for June 18, 2013
##Calculator 1 Create a command line calculator. It should have a basic and advanced mode.
basic calculator (+, -, *, /) advanced calculator (exponents, square root)
For a basic calculator, press 1.
| 9:15 Homework | |
| 10:00 Arrays | |
| 10:30 Break | |
| 10:40 Loops | |
| 12:15 Lunch | |
| 1:15 Hashes | |
| 2:45 Break | |
| 3:00 Lab | |
| 9:15 Homework | |
| 10:00 Arrays | |
| 10:30 Break | |
| 10:40 Loops | |
| 12:15 Lunch | |
| 1:15 Hashes | |
| 2:45 Break | |
| 3:00 Lab | |
| Array, hash or string | |
| In documentation, you're likely to see a has listed as hash. Arrays will often be called a. Keys will often be listed as k. | |
| m + n | |
| Array, hash or string | |
| In documentation, you're likely to see a has listed as hash. Arrays will often be called a. Keys will often be listed as k. | |
| m + n | |
The first thing that really surprised me today was the flexibility of Ruby's shovel operator, <<. A student in the class had tried the following:
a = [0]
a << aWhat do you think a is now? I was sure it would be [0, [0]]. But lo and behold, Ruby sparkles;
a = [0]
a << a