Definition:
It is a relational operator used in a programming language.
If you want to check whether the value of the left operand is greater than the right operand, you use the greater than operator (>).
If it finds the condition true, then it returns True; otherwise, it returns False.
Syntax:
a > b
Example:
rs_balance = 8000
rs_withdraw = 2000
if rs_balance > rs_withdraw:
print("Transaction is successful")
else:
print("Insufficient Balance")
Output:
Exercise
Create two variables marks1 and marks2 and check whether marks1 is greater than marks2 using the greater than operator.
