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

Arithmetic Operator

Uploaded by

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

Arithmetic Operator

Uploaded by

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

Use of Arithmetic Operators in Python:

“Arithmetic operators are used to perform mathematical operations on


numbers.”

1. Addition (+)

● Use: Adds two numbers.


● Example:

a = 10

b=5

result = a + b

print(result)

2. Subtraction (-)

● Use: Subtracts the second number from the first.


● Example

a = 10

b=5

result = a - b

print(result)

3. Multiplication (*)

● Use: Multiplies two numbers.


● Example

a = 10

b=5

result = a * b

print(result)
4. Division (/)

● Use: Divides the first number by the second. The result is a floating-point
number.
● Example

a = 10

b=5

result = a / b

print(result)

5. Modulus (%)

● Use: Returns the remainder of the division of the first number by the second.
● Example

a = 10

b=3

result = a % b

print(result)

7. Exponentiation (**)

● Use: Raises the first number to the power of the second number.
● Example

a=2

b=3

result = a ** b

print(result)

You might also like