Topics Covered: Creating, assigning, reassigning variables; creating and running scripts; console input and output
Learn to Program (reading assigned for day 1) will be your bread and butter for learning basic ruby concepts. Here's a list of some other great online resources to help you perfect your ruby skills.
Note: You don't have to do all of these, they're just here to help you if you're struggling or if you're ahead and interested in learning concepts that are outside the scope of this class
Note: All exercises must live inside of your s0203_exercises/firstname_lastname/d2
folder
While inside of your s0203_exercises
directory, you can git add .
then git commit -m "Helpful commit message here"
and git push origin master
to submit your homework to GitHub. (Don't forget to use git status
along the way to check the state of your files in git)
Create (subl <filename>
from terminal) a file named answers.md
in your d2
folder. You will use markdown to add the answers from the questions below to your answers.md
file. Check out this cheatsheet to learn the syntax, it's very straightforward. You can use the aid of an online editor like Dillinger as well.
answers.md
file using markdown formatSome of these questions were not covered in our lecture today, it's up to you to do some research and figure out how to solve them.
x
to the value 5
?"Matt"
?x = 5
in our REPL (pry), is x a string?"YO" + "LO"
"Cool".+("io")
"bob" + 42
a = "Bat"
& b = "woman"
What does the expression, a + b
, evaluate to?my_name = "50 Cent"
then my_name = "Miley"
What does this expression print? p my_name
rapper = "Jaydakiss"
What would you type to get the first letter from the string "Jaydakiss"
?"Jaydakiss"
string.