1. Arithmetic Operators

Arithmetic operators are used to perform basic mathematical calculations such as addition, subtraction, multiplication, and division. These are some of the most commonly used operators in Python.

Types of Arithmetic Operators in Python:

  1. Addition (+): Adds two values.
    Example: 5 + 3 → 8
  2. Subtraction (−): Subtracts right operand from left.
    Example: 5 - 2 → 3
  3. Multiplication (*): Multiplies two values.
    Example: 4 * 3 → 12
  4. Division (/): Divides left operand by right and returns a float.
    Example: 10 / 2 → 5.0
  5. Floor Division (//): Returns only the integer part of the division.
    Example: 10 // 3 → 3
  6. Modulus (%): Returns the remainder of division.
    Example: 10 % 3 → 1
  7. Exponentiation (**): Raises first value to the power of second.
    Example: 2 ** 3 → 8

Examples of Arithmetic Operators in Python

1. Addition (+)

a = 5
b = 3
print("Addition:", a + b)

Output:

Addition: 8

Explanation:

5 + 3 equals 8. The + operator adds the two values.

2. Subtraction (-)

a = 5
b = 2
print("Subtraction:", a - b)

Output:

Subtraction: 3

Explanation:

5 - 2 equals 3. The - operator subtracts the second number from the first.

3. Multiplication (*)

a = 4
b = 3
print("Multiplication:", a * b)

Output:

Multiplication: 12

Explanation:

4 × 3 equals 12. The * operator multiplies both values.

4. Division (/)

a = 10
b = 2
print("Division:", a / b)

Output:

Division: 5.0

Explanation:

10 ÷ 2 equals 5.0. The / operator returns the result as a float.

5. Floor Division (//)

a = 10
b = 3
print("Floor Division:", a // b)

Output:

Floor Division: 3

Explanation:

10 ÷ 3 gives 3.33, but // returns only the integer part → 3.

6. Modulus (%)

a = 10
b = 3
print("Modulus:", a % b)

Output:

Modulus: 1

Explanation:

10 divided by 3 leaves a remainder of 1. The % operator gives the remainder.

7. Exponentiation (**)

a = 2
b = 3
print("Exponentiation:", a ** b)

Output:

Exponentiation: 8

Explanation:

2 raised to the power 3 → 2 × 2 × 2 = 8. The ** operator is used for powers.

Important Points to Remember:

  • Arithmetic operations follow operator precedence rules. For example, multiplication is done before addition.
  • Using / always gives a float result, even if both numbers are integers.
  • These operators can be used with numbers, variables, and even expressions.
  • Parentheses () have the highest precedence. Operations inside them are always evaluated first.
    Example: (2 + 3) * 4 → 20
  • Python follows the **PEMDAS** rule for operator precedence:
    • P: Parentheses
    • E: Exponentiation (**)
    • MD: Multiplication (*) and Division (/ // %) (left to right)
    • AS: Addition (+) and Subtraction (-) (left to right)

Welcome to ShikshaSanchar!

ShikshaSanchar is a simple and helpful learning platform made for students who feel stressed by exams, assignments, or confusing topics. Here, you can study with clarity and confidence.

Here, learning is made simple. Notes are written in easy English, filled with clear theory, code examples, outputs, and real-life explanations — designed especially for students like you who want to understand, not just memorize.

Whether you’re from school, college, or someone learning out of curiosity — this site is for you. We’re here to help you in your exams, daily studies, and even to build a strong base for your future.

Each note on this platform is carefully prepared to suit all levels — beginner to advanced. You’ll find topics explained step by step, just like a good teacher would do in class. And the best part? You can study at your pace, anytime, anywhere.

Happy Learning! – Team ShikshaSanchar