Important Notice:

Arithmetic Operators

Arithmetic Operators

33 views 3 min read

Arithmetic Operators (अंकगणितीय ऑपरेटर) :-

Arithmetic Operators (अंकगणितीय ऑपरेटर) वे Operators हैं जिनका उपयोग गणितीय (Mathematical) गणनाएँ (Calculations) करने के लिए किया जाता है। इनकी सहायता से हम जोड़ (Addition), घटाव (Subtraction), गुणा (Multiplication), भाग (Division), शेषफल (Modulus), घात (Exponentiation) तथा पूर्णांक भाग (Floor Division) जैसी गणनाएँ कर सकते हैं।

Python में Arithmetic Operators सबसे अधिक उपयोग किए जाने वाले Operators हैं और लगभग हर Program में इनका उपयोग होता है।

English

Arithmetic Operators are used to perform mathematical calculations such as addition, subtraction, multiplication, division, modulus, exponentiation, and floor division.

These are the most commonly used operators in Python and are used in almost every Python program.

 

Syntax -

operand1 operator operand2
 
Example :-
a = 20
b = 10
print(a + b)
 
Output-
30
 
1. Addition Operator (+) – जोड़ :-

The Addition Operator (+) is used to add two or more operands.

Addition Operator (+) का उपयोग दो या दो से अधिक संख्याओं को जोड़ने के लिए किया जाता है।

Syntax-

result = operand1 + operand2

Example -

a = 25
b = 15
print(a + b)
 
Output -
40
 
2. Subtraction Operator (-) – घटाव :-

The Subtraction Operator (-) is used to subtract one operand from another.

Subtraction Operator (-) का उपयोग एक संख्या में से दूसरी संख्या घटाने के लिए किया जाता है।

Syntax-

result = operand1 - operand2

Example -

a = 25
b = 15
print(a - b)
 
Output -
10
 
3. Multiplication Operator (*) – गुणा :-

The Multiplication Operator (*) is used to multiply two operands.

Multiplication Operator (*) का उपयोग दो संख्याओं का गुणा करने के लिए किया जाता है।

Syntax -
result = operand1 * operand2
 

Example -

a = 12
b = 5
print(a * b)
 
Output -
60
 
4. Division Operator (/) – भाग :-

The Division Operator (/) divides one operand by another and always returns a float value.

Division Operator (/) का उपयोग भाग देने के लिए किया जाता है तथा यह हमेशा Float Result देता है।

Syntax :-
result = operand1 / operand2

Example -

a = 10
b = 4
print(a / b)
 
Output -
2.5
 
5. Modulus Operator (%) – शेषफल :-

The Modulus Operator (%) returns the remainder after division.

Modulus Operator (%) भाग देने के बाद बचा हुआ शेषफल (Remainder) लौटाता है।

 Syntax :-

result = operand1 % operand2

Example -

a = 10
b = 3
print(a % b)
 
Output -
1
 
6. Floor Division Operator (//) – पूर्णांक भाग :-

The Floor Division Operator (//) returns only the integer part (quotient) of the division.

Floor Division Operator (//) भाग देने के बाद केवल पूर्णांक भाग (Integer Quotient) लौटाता है।

Syntax :-
result = operand1 // operand2

Example -

a = 10
b = 3
print(a / /b)
 
Output -
3
7. Exponentiation Operator (**) – घात :-

The Exponentiation Operator (**) raises one number to the power of another.

Exponentiation Operator (**) किसी संख्या की घात (Power) निकालने के लिए उपयोग किया जाता है।

Syntax :-
result = operand1 ** operand2

Example -

a = 2
b = 5
print(a **b)
 
Output -
32
 
Arithmetic Operators Using User Input in one program:-  
a = int(input("Enter First Number: "))
b = int(input("Enter Second Number: "))

print("\nFirst Number :", a)
print("Second Number:", b)

print("\nAddition (+)        :", a + b)
print("Subtraction (-)     :", a - b)
print("Multiplication (*)  :", a * b)
print("Division (/)        :", a / b)
print("Modulus (%)         :", a % b)
print("Floor Division (//) :", a // b)
print("Exponentiation (**) :", a ** b)
 
Output-
 
Enter First Number: 20
Enter Second Number: 6

First Number : 20
Second Number: 6

Addition (+)        : 26
Subtraction (-)     : 14
Multiplication (*)  : 120
Division (/)        : 3.3333333333333335
Modulus (%)         : 2
Floor Division (//) : 3
Exponentiation (**) : 64000000
 

Related Notes