Operators

 Arithmetic Operator

It is an operator that calculates mathematical problems like addition, subtraction, multiplication and division.
  • Addition:-
  • Multiplication:-

Conditional operator

It is an operator that has a condition which means that it has 2 choices whether yes or no. Examples are:-
  • If and Else

  • Elif


  • While


Relational Operator

Relational operators in Python are used to compare values and are also known as comparison operators too.
  • "==" Checks if the values are same



  • "!=" Checks if the values are not the same


  • ">" Checks if the value on the left is greater than the value on the right 


  • "<"  Checks if the value on the right is greater than the value on the left


  • "<="Checks if the left value is less or equal to the right value


  • ">=" Checks if the right value is less or equal to the left value







Comments

Popular posts from this blog

Datatypes in Python

Basic concepts