0% found this document useful (0 votes)
6 views

Arithmetic Operators

The document describes different types of arithmetic, identity, membership, and logical operators in Python. Arithmetic operators are used for mathematical calculations like addition, subtraction, multiplication, and division. Identity operators check if two variables are the same object. Membership operators check if a sequence is present in an object. Logical operators combine conditional statements.

Uploaded by

karthikmallina0
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)
6 views

Arithmetic Operators

The document describes different types of arithmetic, identity, membership, and logical operators in Python. Arithmetic operators are used for mathematical calculations like addition, subtraction, multiplication, and division. Identity operators check if two variables are the same object. Membership operators check if a sequence is present in an object. Logical operators combine conditional statements.

Uploaded by

karthikmallina0
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/ 1

Arithmetic operators

operator Description example


+ (addition) Add two operands a+b
Subtract the right operand from the a-b
- (subtraction)
left
* (multiplication Multiply the both operands a*b
/ (division) Divide numerator by denominator a /b
% (module) Gives the remainder after division a%b
It calculates the power of first a ** b
** (exponential)
operands power to the second
Same as division but it gives the a // b
// (floor division) nearest whole number results after
division

identity operators

operator Description

is It will returns true if both variables are same object

is not It will returns true if both variables are not same object

Membership operators

operator Description
It will returns true if the sequence with specific value
In
present in the object
It will returns true if the sequence with specific value is not
not in
present in the object

logical operators

operator Description
If both the conditions meet the criteria(non zero)then the condition
&& (and)
becomes true
If any one the conditions meet the criteria(non zero)then the condition
|| (or)
becomes true
It is used for reverse result . if the condition Is true it gives false .if it is
! (not)
false it gives true

You might also like