Learn
Conditionals
The π logical Operator

Another helpful logical operator is the `π` operator.

The `π` operator also checks two expressions and returns a `π` value. The major difference is that the `π` operator returns `π` so long as a single expression is `π`.

Hereβs the table of expression combinations:

Expression Evaluates to
`π π π` `π`
`π π π` `π`
`π π π` `π`
`π π π` `π`

From the table above, we see that the only expression that returns `π` is when both values are `π`, (`π π π`).

Letβs look over a code snippet using `π`:

``````π β‘οΈπ hasUmbrella
π β‘οΈπ hasRaincoat
βͺοΈ hasUmbrella π hasRaincoat π
π π€Walking in the rain is fun!π€βοΈ
π
π π
π π€Let's stay insideπ€βοΈ
π

π­ Prints: Walking in the rain is fun!``````

Notice, `hasUmbrella` has a value of `π`, while `hasRaincoat` has a value of `π`. Our condition checks `hasUmbrella π hasRaincoat`. As long as either `hasUmbrella` OR `hasRaincoat` is `π`, it returns `π`. Since `Walking in the rain is fun!` was printed, we can confirm that our condition returned `π`.

### Instructions

1.

Under the `π π€Heads I win, Tails you loseπ€βοΈ` statement, create a `βͺοΈ` statement that checks `isHeads` or `isTails`. Then, add its `ππ` block that contains a `πβοΈ` with the string: `π€Looks like I winπ€`.