TIP: You can open a new Terminal window and type irb
to enter a Ruby prompt. On this screen you type and execute Ruby code, similar to what you were doing on Code Academy.
###Questions to ask yourself:
Methods
-
What is a method in Ruby?
-
What is the use of a method?
-
What are some examples of methods we use on a String?
-
What are some examples of methods we use on an Integer?
-
Can I write my own method?
- Check this link for some info on writing methods
-
What does an argument and how does this relate to methods?
-
Can I write a method that when called, prints my name to the Terminal?
Conditionals
-
Can I write an
if
statement in Ruby? -
If so, can I modify that statement to add an
else
andelsif
?
Comparator
-
Is
=
the same as==
? -
What happens if I type
a = "Zelda"
in my Terminal? -
What happens if I type
a == "Zelda"
in my Terminal? -
What does
&&
mean in Ruby? -
How is
&&
useful when programming?
Booleans
-
What is a boolean value?
-
What will happen if I type the below into my terminal?
zelda = true if zelda == false puts "Zelda is a figment of your imagination" else puts "Zelda is real! I wonder if this the Easter Bunny is real too" end