0% found this document useful (0 votes)
10 views2 pages

Python Arithmetic Operators Explained

The document provides examples of various arithmetic operators in programming. It demonstrates the use of addition, subtraction, multiplication, division, modulus, exponentiation, and floor division with corresponding outputs. Each operation modifies the variable 'a' based on the value of 'b' and prints the result.

Uploaded by

disha.wanjari
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)
10 views2 pages

Python Arithmetic Operators Explained

The document provides examples of various arithmetic operators in programming. It demonstrates the use of addition, subtraction, multiplication, division, modulus, exponentiation, and floor division with corresponding outputs. Each operation modifies the variable 'a' based on the value of 'b' and prints the result.

Uploaded by

disha.wanjari
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

OPERATORS

a=7
Output: 7

a=10
b=5
a+=b
print(a)
Output: 15

a=6
b=3
a-=b
print(a)
Output: 3

a=6
b=3
a*=b
print(a)
Output: 18

a=6
b=3
a/=b
print(a)
Output: 2.0

a=63
b=6
a%=b
print(a)
Output: 3

a=2
b=3
a**=b
print(a)
Output: 8
a=108
b=6
a//=b
print(a)
Output: 18

You might also like