Course of Raku / Advanced / Operators / Review of operator behaviour / Exercises

Chained comparison

Problem

A test score is valid when it lies between 0 and 100, with both ends allowed. Using a single chained comparison, print whether the score 73 is valid.

Example

The program prints:

True

Solution

See the solution

Course navigation

Solution: Power tower   |   Solution: Chained comparison