mirror of
https://github.com/ro31337/rubyisforfun
synced 2024-11-16 19:50:09 +01:00
Save
This commit is contained in:
parent
6d7bc92ca4
commit
769f3b1703
1 changed files with 12 additions and 3 deletions
|
@ -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:| | |
|
||||
|
|
Loading…
Reference in a new issue