This commit is contained in:
Roman Pushkin 2019-01-10 22:24:16 -08:00
parent 6d7bc92ca4
commit 769f3b1703

View file

@ -113,13 +113,22 @@ end
Sometimes one-liners make sense and make your program more readable. Moreover, some of them look like plain English sentences, what could be easier?
X> ## Exercise
X> Fill out tables below, try to figure out what would be the result of operation for Ruby language? Check your results by executing expressions in REPL.
X> Fill out four tables below, try to figure out what would be result (true or false) for each condition below? Check your answers by executing expressions in REPL.
**Table 1**
|Expression:| `1 > 1` | `1 < 1` | `1 >= 2` | `1 == 1` | `1 != 1` |
|Your guess:| | | | | |
**Table 2**
|Expression:| `1 > 2` | `1 < 2` | `1 <= 2` | `1 == 2` | `1 != 2` |
|Your guess:| | | | | |
|Expression:| `true > false` | `false > true` | `true == true` | `false == false` | `false != true` |
|Your guess:| | | | | |
**Table 3**
```
|Expression:| `true > false` | `false > true` | `true == true` |
|Your guess:| | | |
```
**Table 4**
|Expression:| `false == false` | `false != true` |
|Your guess:| | |