else statements are made even more powerful with comparison operators.
There are two comparisons you might be familiar with:
- Less than:
- Greater than:
You may also recognize these:
- Less than or equal to:
- Greater than or equal to:
Comparisons need two things to compare and they will always return a boolean (
How can we use comparisons and an
else statement to see if it's time to eat?