Check which version of ruby you have installed (compare this to the version that should be installed according to the instructor)
What do you think happens when you combine the following floats and integers? Is the result a float or an integer? If an operator is unfamiliar, look it up and learn what it does. Check yourself using IRB.
- 3.0 / 2
- 3 / 2.0
- 4 ** 2.0
- 4.1 % 2
What do you think the output will be if you type these into IRB? Record the output you expect, and the actual (if it is different).
- "tom" * 3
- "tom" + "tom"
- "tom" + 1
- "tom" / 2
Try these calculations in IRB
- How many hours are in a year?
- How many minutes are in a decade?
- How many seconds old are you?