Programs use simple comparisons to help make decisions. Boolean logic is a form of algebra where all values are either True or False. These values of true and false are used to test the conditions that selection and iteration are based around.
Boolean logic uses algebra and algebraic expressions. We use these expressions in algorithms and programs.
|Greater than or equal to||>=|
|Less than or equal to||<=|
|Does not equal||<>|
Most programming languages use these equivalent Boolean expressions. However, some, such as Python, have slightly different equivalents:
|Expression||Boolean equivalent||In Python|
|Does not equal||<>||!=|