← back to unit
Easy
# basics variables
Comparing Values
Comparison operators compare two values and give back True or False:
==equal to (careful — one=assigns, two==compares!)!=not equal to<><=>=less/greater than (or equal to)
print(5 == 5)
print(5 > 8)
prints:
True
False
Your turn: read two numbers, a and b. Print the result of a == b, then print the result of a > b.
💡 need a hint?
pyb-var-comparison.py🔒 given lines are locked — write your code in between
loading...