Section 1 - Instruction

Last time, we learned about Booleans (True and False) and how the == operator checks if two values are equal, resulting in a Boolean.

Comparisons are essential for making decisions in programs.

Engagement Message

What if we want to check if two values are not equal?

Section 2 - Instruction

Python uses != (an exclamation mark followed by an equals sign) to check for inequality.

10 != 5 evaluates to True because 10 is not equal to 5.

Engagement Message

What Boolean value would 10 != 10 produce?

Section 3 - Instruction

We can also compare if one number is greater than another using the > symbol.

15 > 10 results in True. 10 > 15 results in False.

Engagement Message

What do you think 10 > 10 evaluates to?

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal