Menu

Sign in to track your progress and unlock all features.

Theme style

Log in

Full lesson preview

Evaluate Boolean Expressions

Use comparison and boolean operators to determine if three values are strictly increasing.

Python practice17 minVariables & Data TypesIntermediateLast updated January 2, 2026

Problem statement

Given three numbers a, b, and c, return True if they are strictly increasing (a < b < c), otherwise return False. Use Python comparison chaining and boolean evaluation rather than multiple separate comparisons if possible. This helps practice comparisons, boolean results, and returning boolean values directly.

Task

Implement a function that evaluates a chained comparison (a < b < c) and returns the boolean result.

Examples

Strictly increasing

Input

is_strictly_increasing(1, 2, 3)

Output

True

1 < 2 < 3 is True, so the function returns True.

Input format

Three numeric values a, b, c are passed as arguments to is_strictly_increasing.

Output format

Return a boolean: True if a < b < c, otherwise False.

Constraints

- Inputs can be integers or floats. - Use Python's comparison behavior; equal adjacent values should result in False.

Samples

Sample 1

Input

is_strictly_increasing(2, 2, 3)

Output

False

Because 2 is not less than 2, the chained comparison fails.