Operators in Python
OPERATORS
An operator in a programming language is a symbol that tells the compiler or interpreter to perform specific mathematical, relational or logical operation and produce final result.
Types of Operators :
1) Arithmetic Operators :
- Addition Operator : ' + '
- Subtraction Operator : ' - '
- Division Operator : ' / '
- Multiplication Operator : ' * '
Following are examples of Arithmetic Operators
- Greater than : ' > '
- Less than : ' < '
- Equals : ' == '
- Greater than Equal to : ' >= '
- Less than Equal to : ' <= '
- Not Equal to : ' != '
- And Operator : ' & ' ( It returns TRUE if both the operands are True )
- Or Operator : ' | ' ( It returns TRUE if either of the operand is True )
In Python we can write comments initializing with ' # '
Comments
Post a Comment