Learn
Conditionals
Comparison Operators

In addition to `π` operator, Emojicode also offers other comparison operators to expand our use cases!

Hereβs a list of the comparison operators:

Operator Operation
βοΈ Less than
βΆοΈ Greater than
βοΈπ Less than or equal to
βΆοΈπ Greater than or equal to

Like the `π` operator, the listed operators all compare two values and returns a `π` or `π` value. For example:

``2 βοΈ 5 π­ π``

We can read the expression above as a question, βis `2` less than `5`?β Since the answer is yes, then `π` is returned. Below are a few more examples to read through to understand the use of comparison operators:

``````4 βοΈ 4         π­ π
10 βΆοΈ 5        π­ π
10.6 βοΈπ 10.6 π­ π
3.14 βΆοΈπ 4    π­ π``````

Once youβre ready, tackle the steps in this exercise!

### Instructions

1.

Imagine weβre in a theme park that has different attractions. Each attraction has a height requirement (in centimeters) as shown by the variables `hurlyWhirlyMinHeight` and `tinyHouseMaxHeight`.

Weβll be adding in checks to see if our visitor can safely enjoy these attractions, but first, we need a visitor!

Type out your height (in centimeters) and use `β‘οΈ` to assign it to a variable called `myHeight`.

2.

As we can tell from `hurlyWhirlyMinHeight`, the Hurly-Whirly ride has a minimum height of `120` cm.

Create an `βͺ` statement that checks if `myHeight` is less than to `hurlyWhirlyMinHeight`. Inside the `ππ` block, add a `πβοΈ` statement that prints out `π€You must be taller than 120cm to rideπ€`.

3.

Our other attraction, the Tiny House has a maximum height of `214` cm (as seen by `tinyHouseMaxHeight`).

Create another `βͺ` statement that checks if `myHeight` is greater than or equal to `tinyHouseMaxHeight`. Inside the `ππ` block, add a `πβοΈ` statement that prints out `π€You must be 214cm or shorter to enterπ€`.