Editor settings

General settings

Save settings

Learn to program with Python

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 result should be False
  • Use greater than or equal to operator >‏=
Output will be displayed here