Greater than or equal to operator #
The greater than or equal to operator in Python is denoted by >= It is used to compare two values and checks whether the left value is greater than or equal to the right value. If the condition is true, it returns True, otherwise, it returns False.
Sometimes, the greater than or equal to operator shows up as >= or >=, depending on the code editor you are using.
For example:
print(5 >= 3) # True
print(3 >= 5) # False
print(5 >= 5) # True
Exercise #
Create a variable result to have a value False by using greater than or equal to operator >=.
Tests #
- Variable
resultshould beFalse - Use greater than or equal to operator
>=
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules