0% found this document useful (0 votes)
0 views3 pages

Python Course

The document explains operators in Python, defining them as symbols that perform operations on operands. It categorizes operators into types such as arithmetic, relational, logical, bitwise, assignment, and special operators, providing examples for each. Additionally, it details the behavior of arithmetic and relational operators with specific examples illustrating their functions.

Uploaded by

Likhitha M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views3 pages

Python Course

The document explains operators in Python, defining them as symbols that perform operations on operands. It categorizes operators into types such as arithmetic, relational, logical, bitwise, assignment, and special operators, providing examples for each. Additionally, it details the behavior of arithmetic and relational operators with specific examples illustrating their functions.

Uploaded by

Likhitha M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

OPERATORS:

An operator is a symbol that tells the computer to perform certain operations.


Operands are the values on which the operation takes place
An expression is any combination of operators and operands that evaluates to
a single value.
The following are different types of operators available in python.
1.Arithmetic Operators(+, - , * , / , % , **)
2.Relational/Comparison Operators(<,<=,>,>=,==,!= or<>)
3.Logical Operators(and,or,not)
4.Bitwise Operators(& , / , ~ , << , >> , ^)
5.Assignment Operators(=)
6.Special Operators
a. Identity Operators[is ,is not]
b. Membership Operators[in, not in]
1.Arithmetic Operators:
The arithmetic operators behave in similar how they behave in algebra.
symbol operation Example
+ Addition 2+2=4
- Subtraction 2-2=0
* Multiplication 2*2=4
/ Division 2/2=1
% Modulo division 2%2=0

2.Relational/Comparison Operators
The relational operators give the relation between the two given operands.
The outcome of relational operators is a Boolean value.
< Less than 1<3= true
<= Less than or equal to 1<=3=true
> Greater than 1>3=false
>= Greater than or equal to 1>=3=false
== Equal to 7==4=false

You might also like