Computer Science, asked by ArianagradeFAN, 3 months ago

What are the types of operators in python?

Answers

Answered by Anonymous
1

Python divides the operators in the following groups:

Arithmetic operators.

Assignment operators.

Comparison operators.

Logical operators.

Identity operators.

Membership operators.

Bitwise operators.

Answered by Equestriadash
11

There are mainly 4 types of operators in Python.

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Assignment Operators

1. Arithmetic operators

Arithmetic operators, as the name suggests, are operators that deal with calculations/algebraic expression. They include addition [+], subtraction [-], multiplication [*], division [/], exponentiation [**], modulo [%] and floor division [//].

2. Relational operators

Relational operators are used to compare two values that may result to either True or False. They include less than [<], greater than [>], less than/equal to [<=], greater than/equal to [>=], not equal to [!=] and equal to [=].

3. Logical operators

Logical operators are used to compare two expressions/values, somewhat similar to relational operators. They include and, or and not.

4. Assignment operators

Assignment operators are used to assign values into variables. They include =, +=, -=, /=, %=, **= and //=.


BrainlyIAS: For floor division , Isn't it // (double slash)
Equestriadash: Corrected, thank you!
Equestriadash: Thanks for the Brainliest!
BrainlyIAS: :meow_disappointed:
Similar questions