Python Arithmetic Operators || arithmetic operators in python, arithmetic operators in python in hindi

Home ๐Ÿ‘‰ O level ๐Ÿ‘‰ Python ๐Ÿ‘‰ Unit 4


Arithmetic Operators in Python

Arithmetic operators:-

    เค‡เคจ เค‘เคชเคฐेเคŸเคฐों เค•ा เค‰เคชเคฏोเค— เคธाเคฎाเคจ्เคฏ เค…ंเค•เค—เคฃिเคคीเคฏ เค—เคฃเคจाเคं เคœैเคธे เคœोเคก़, เค—ुเคฃा เค†เคฆि เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เค…ंเค•เค—เคฃिเคค เค“เคชेเคฐเคŸเคฐ เคตे เคšिเคจ्เคน เคนैं เคœिเคจเค•ा เค‰เคชเคฏोเค— เค—เคฃिเคค เค”เคฐ เคช्เคฐोเค—्เคฐाเคฎिंเค— เคฎें เคธंเค–्เคฏाเค“ं เคฏा เคตेเคฐिเคเคฌเคฒ्เคธ เคชเคฐ เคฌेเคธिเค• เค—เคฃिเคคीเคฏ เค•ाเคฐ्เคฏ เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เค•ंเคช्เคฏूเคŸเคฐ เคช्เคฐोเค—्เคฐाเคฎिंเค— เคฎें, เค‡เคจ เค‘เคชเคฐेเคŸเคฐों เค•ा เค‰เคชเคฏोเค— เคธंเค–्เคฏाเคค्เคฎเค• เคฎाเคจों เคฎें เคฌเคฆเคฒाเคต เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เคฏे เค‘เคชเคฐेเคŸเคฐ เค—เคฃिเคคीเคฏ เค—เคฃเคจा เค•เคฐเคจे เคฎें เคฎौเคฒिเค• เคนैं เค”เคฐ เคชाเคฏเคฅเคจ, เคธी, เคœाเคตा เค”เคฐ เค…เคจ्เคฏ เคช्เคฐोเค—्เคฐाเคฎिंเค— เคญाเคทाเค“ं เคฎें เคต्เคฏाเคชเค• เคฐूเคช เคธे เค‰เคชเคฏोเค— เค•िเค เคœाเคคे เคนैं।

    These operators are used to perform common arithmetic calculations like addition, multiplication etc. These operators are used to perform common arithmetic calculations like addition, multiplication etc. Arithmetic operators are symbols or characters used in mathematics and programming to perform basic mathematical operations on numbers or variables. In computer programming, these operators are used to manipulate numeric values. These operators are fundamental in performing mathematical calculations and are widely used in programming languages like Python, C, Java, and more.


  • Exponentiation ( ** )
  • Multiplication ( * )
  • Division ( / )
  • Floor (Integer) Division ( // )
  • Modulus ( % )
  • Addition ( + )
  • Subtraction ( - )

Exponentiation (Power) Operator [ ** ]:-

    เคฏเคน เค‘เคชเคฐेเคŸเคฐ เค•िเคธी เคธंเค–्เคฏा เค•ा เคชाเคตเคฐ เค•ैเคฒเค•ुเคฒेเคŸ เค•เคฐเคคा เคนै। เค‘เคชเคฐेเคŸเคฐ เค•े เคฌाเคं เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เค†เคงाเคฐ เคคเคฅा เคฐाเค‡เคŸ เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เค˜ाเคคांเค• เคนोเคคी เคนै। เคชाเคฏเคฅเคจ เคฎें, เคเค•्เคธเคชोเคจेंเคŸ (เคชाเคตเคฐ) เค‘เคชเคฐेเคŸเคฐ เค•ो เคฆो เคคाเคฐांเค•เคจ (**) เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เค‡เคธเค•ा เค‰เคชเคฏोเค— เค•िเคธी เคธंเค–्เคฏा เค•ो เคเค• เคจिเคถ्เคšिเคค เค˜ाเคค (เคชाเคตเคฐ) เคคเค• เคฌเคข़ाเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เคฌाเคฏां เค‘เคชเคฐेंเคก เค†เคงाเคฐ (เคฌेเคธ) เคนै, เค”เคฐ เคฆाเคฏां เค‘เคชเคฐेंเคก เคช्เคฐเคคिเคชाเคฆเค• (เคเค•्เคธเคชोเคจेंเคŸ)  เคนै। เคเค•्เคธเคชोเคจेंเคŸ (เคชाเคตเคฐ) เค‘เคชเคฐेเคŸเคฐ เคฒूเคช เคฏा เค•เคธ्เคŸเคฎ เคซ़ंเค•्เคถंเคธ เค•ी เค†เคตเคถ्เคฏเค•เคคा เค•े เคฌिเคจा เคชाเคฏเคฅเคจ เคฎें เค˜ाเคคांเค• เคจिเค•ाเคฒเคจे เค•ा เคเค• เคธुเคตिเคงाเคœเคจเค• เคคเคฐीเค•ा เคนै।

    This operator calculates the power of a number. The value on the left side of the operator is the base and the value on the right side is the exponent. In Python, the exponentiation operator is represented by two asterisks (**). It is used to raise a number to a certain power. The left operand is the base, and the right operand is the exponent. The exponentiation operator is a convenient way to perform exponentiation in Python without the need for loops or custom functions.


syntax: x ** y
example: 2 ** 3
result: 8
hint: 23 = 2*2*2 = 8

example: 2 ** 3 ** 2
result: 512
hint: 232 = 2**(3**2) = 2**9 = 512

Multiplication [ * ]

    เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคฆो เคธंเค–्เคฏाเค“ं เค•ा เค—ुเคฃเคจเคซเคฒ เคจिเค•ाเคฒเคคा เคนै। เคชाเคฏเคฅเคจ เคฎें เค—ुเคฃเคจ เค‘เคชเคฐेเคŸเคฐ เค•ो เคเคธ्เคŸเคฐिเคธ्เค• เคšिเคน्เคจ (*) เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เค‡เคธเค•ा เค‰เคชเคฏोเค— เคฆो เคธंเค–्เคฏाเค“ं เคฏा เคฎाเคจों เค•ो เคเค• เคธाเคฅ เค—ुเคฃा เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เค†เคช เค—ुเคฃเคจ เค‘เคชเคฐेเคŸเคฐ เค•ा เค‰เคชเคฏोเค— เคชूเคฐ्เคฃांเค• เค”เคฐ เคซ़्เคฒोเคŸिंเค—-เคชॉเค‡ंเคŸ เคธंเค–्เคฏाเค“ं เคฆोเคจों เค•े เคธाเคฅ เค•เคฐ เคธเค•เคคे เคนैं, เค”เคฐ เค‡เคธเค•ा เค‰เคชเคฏोเค— เค…เคงिเค• เคœเคŸिเคฒ เค…ंเค•เค—เคฃिเคคीเคฏ เคธंเคšाเคฒเคจ เคฏा เคเค•्เคธเคช्เคฐेเคถเคจ เค•े เคญीเคคเคฐ เคญी เค•िเคฏा เคœा เคธเค•เคคा เคนै।

    This operator calculates the product of two numbers. The multiplication operator in Python is represented by the asterisk symbol (*). It is used to multiply two numbers or values together. You can use the multiplication operator with both integers and floating-point numbers, and it can also be used for more complex arithmetic operations or within expressions.


syntax: x * y
example: 2 * 3
result: 6

Division [ / ]

    เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคญाเค— เค•เคฐเคคा เคนै เคคเคฅा เคญाเค—เคซเคฒ เคฆेเคคा เคนै। เค‘เคชเคฐेเคŸเคฐ เค•े เคฌाเคं เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เค•ो เคฐाเค‡เคŸ เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เคธे เคญाเค— เค•िเคฏा เคœाเคคा เคนै। เคชाเคฏเคฅเคจ เคฎें เคกिเคตीเคœเคจ เค‘เคชเคฐेเคŸเคฐ เค•ो เคซॉเคฐเคตเคฐ्เคก เคธ्เคฒैเคถ ("/") เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เค‡เคธเค•ा เคช्เคฐเคฏोเค— เคเค• เคธंเค–्เคฏा เค•ो เคฆूเคธเคฐी เคธंเค–्เคฏा เคธे เคตिเคญाเคœिเคค เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เคœเคฌ เค†เคช เคกिเคตीเคœ़เคจ เค‘เคชเคฐेเคŸเคฐ เค•ा เค‰เคชเคฏोเค— เค•เคฐเคคे เคนैं, เคคो เคชाเคฏเคฅเคจ เคชเคฐिเคฃाเคฎ เค•े เคฐूเคช เคฎें เคเค• เคซ़्เคฒोเคŸिंเค—-เคชॉเค‡ंเคŸ เคจंเคฌเคฐ (เคฆเคถเคฎเคฒเคต เคธ्เคฅाเคจों เคตाเคฒी เคเค• เคธंเค–्เคฏा) เคฒौเคŸाเคคा เคนै, เคญเคฒे เคนी เคกिเคตीเคœ़เคจ เค•ा เคชเคฐिเคฃाเคฎ เคเค• เคชूเคฐ्เคฃ เคธंเค–्เคฏा เคนो। เคฏเคฆि เค†เคช เคชूเคฐ्เคฃांเค• เคตिเคญाเคœเคจ เค•เคฐเคจा เคšाเคนเคคे เคนैं เค”เคฐ เคชเคฐिเคฃाเคฎ เค•ा เค•ेเคตเคฒ เคชूเคฐा เคญाเค— เคช्เคฐाเคช्เคค เค•เคฐเคจा เคšाเคนเคคे เคนैं, เคคो เค†เคช เคชाเคฏเคฅเคจ เคฎें เคซ़्เคฒोเคฐ เคกिเคตीเคœเคจ เค‘เคชเคฐेเคŸเคฐ (//) เค•ा เค‰เคชเคฏोเค— เค•เคฐ เคธเค•เคคे เคนैं।

    This operator divides and returns the quotient. The value on the left side of the operator is divided by the value on the right side. The division operator in Python is represented by the forward slash ("/"). It is used to divide one number by another. When you use the division operator, Python returns a floating-point number (a number with decimal places) as the result, even if the division would result in a whole number. If you want to perform integer division and get only the whole part of the result, you can use the floor division operator (//) in Python.


syntax: x / y
example: 2 / 3
result: 0.6666666666666666

Floor Division [ // ]

     เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคญाเค— เค•เคฐเคคा เคนै เคคเคฅा เคญाเค—เคซเคฒ เค•ो เค•िเคธी เค‡เคจ्เคŸिเคœเคฐ เคธंเค–्เคฏा เค•े เคฒเค—เคญเค— เคฎें เคฌเคฆเคฒ เคฆेเคคा เคนै। เค‘เคชเคฐेเคŸเคฐ เค•े เคฌाเคं เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เค•ो เคฐाเค‡เคŸ เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เคธे เคญाเค— เค•िเคฏा เคœाเคคा เคนै। เคชाเคฏเคฅเคจ เคฎें, เคซ़्เคฒोเคฐ เคกिเคตीเคœ़เคจ เค‘เคชเคฐेเคŸเคฐ เค•ो `//` เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เค‡เคธเค•ा เค‰เคชเคฏोเค— เคฆो เคธंเค–्เคฏाเค“ं เค•े เคฌीเคš เคตिเคญाเคœเคจ เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै เค”เคฐ เคชเคฐिเคฃाเคฎ เค•े เคชूเคฐ्เคฃांเค• เคญाเค— เค•ो เคฒौเคŸाเคคा เคนै, เคช्เคฐเคญाเคตी เคฐूเคช เคธे เคญाเค—เคซเคฒ เค•ो เคจिเค•เคŸเคคเคฎ เคชूเคฐ्เคฃांเค• เคคเค• เคชूเคฐ्เคฃांเค•िเคค เค•เคฐเคคा เคนै। เคนाเคฒाँเค•ि, `//` เค‘เคชเคฐेเคŸเคฐ เคชเคฐिเคฃाเคฎ เค•ा เค•ेเคตเคฒ เคชूเคฐ्เคฃांเค• เคญाเค— เคฒौเคŸाเคคा เคนै। เคฏเคน เคตिเคถेเคท เคฐूเคช เคธे เคคเคฌ เค‰เคชเคฏोเค—ी เคนोเคคा เคนै เคœเคฌ เค†เคช เคเค• เคธंเค–्เคฏा เค•ो เคฆूเคธเคฐी เคธंเค–्เคฏा เคธे เคธเคฎाเคจ เคฐूเคช เคธे เคตिเคญाเคœिเคค เค•เคฐเคจे เค•ी เคชूเคฐ्เคฃ เคธंเค–्เคฏा เคช्เคฐाเคช्เคค เค•เคฐเคจा เคšाเคนเคคे เคนैं।

    This operator divides and rounds the quotient to an integer number. The value on the left side of the operator is divided by the value on the right side. In Python, the floor division operator is represented by `//`. It is used to perform division between two numbers and returns the integer part of the result, effectively rounding down the quotient to the nearest integer. However, the `//` operator returns only the integer part of the result. This is particularly useful when you want to obtain the whole number of times one number can be evenly divided by another.


syntax: x // y
example (a): 2 // 3
result (a): 0

example (b): 3.0 // 2
result (b): 1.0

Modulo [ % ]

    เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคญाเค— เค•เคฐเคคा เคนै เคคเคฅा เคถेเคทเคซเคฒ เคฆेเคคा เคนै। เค‘เคชเคฐेเคŸเคฐ เค•े เคฌाเคं เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เค•ो เคฐाเค‡เคŸ เคธाเค‡เคก เค•ी เคตैเคฒ्เคฏू เคธे เคญाเค— เค•िเคฏा เคœाเคคा เคนै। เคชाเคฏเคฅเคจ เคฎें เคฎॉเคก्เคฏूเคฒो เค‘เคชเคฐेเคŸเคฐ (%) เค•ा เค‰เคชเคฏोเค— เคถेเคทเคซเคฒ เคœ्เคžाเคค เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै เคœเคฌ เคเค• เคธंเค–्เคฏा เค•ो เคฆूเคธเคฐे เคธे เคตिเคญाเคœिเคค เค•िเคฏा เคœाเคคा เคนै। เคฏเคน เคตिเคญाเคœเคจ เค‘เคชเคฐेเคถเคจ เค•เคฐเคจे เค•े เคฌाเคฆ เคถेเคท เค•ो เคตाเคชเคธ เค•เคฐ เคฆेเคคा เคนै। เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคตिเคญिเคจ्เคจ เค…เคจुเคช्เคฐเคฏोเค—ों เคฎें เค‰เคชเคฏोเค—ी เคนै, เคœैเคธे เคตिเคญाเคœ्เคฏเคคा เค•ी เคœांเคš เค•เคฐเคจा, เคฎाเคจों เค•ी เคเค• เคถ्เคฐृंเค–เคฒा เค•े เคฎाเคง्เคฏเคฎ เคธे เคธाเค‡เค•िเคฒ เคšเคฒाเคจा, เคฏा เคฏเคน เคธुเคจिเคถ्เคšिเคค เค•เคฐเคจा เค•ि เค•ोเคˆ เคฎाเคจ เคเค• เคตिเคถिเคท्เคŸ เคธीเคฎा เค•े เคญीเคคเคฐ เคฐเคนเคคा เคนै। เคฎॉเคก्เคฏूเคฒो เค‘เคชเคฐेเคŸเคฐ เค•เคˆ เคช्เคฐोเค—्เคฐाเคฎिंเค— เค•ाเคฐ्เคฏों เคฎें เคเค• เคฎूเคฒ्เคฏเคตाเคจ เค‰เคชเค•เคฐเคฃ เคนै, เคœिเคธเคฎें เคธเคฎ/เคตिเคทเคฎ เคธंเค–्เคฏाเค“ं เค•ी เคœांเคš เค•เคฐเคจा, เค•िเคธी เคธเคฐเคฃी เคฎें เคคเคค्เคตों เค•े เคฎाเคง्เคฏเคฎ เคธे เคธाเค‡เค•िเคฒ เคšเคฒाเคจा เค”เคฐ เคฌเคนुเคค เค•ुเค› เคถाเคฎिเคฒ เคนै।

    This operator divides and returns the remainder. The value on the left side of the operator is divided by the value on the right side. The modulo operator (%) in Python is used to find the remainder when one number is divided by another. It returns the remainder after performing the division operation. This operator is useful in various applications, such as checking for divisibility, cycling through a range of values, or ensuring that a value stays within a specific range. The modulo operator is a valuable tool in many programming tasks, including checking even/odd numbers, cycling through elements in an array, and more.


syntax: x % y
example: 3 % 2
result: 1


Addition [ + ]

    เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคฆो เคธंเค–्เคฏाเค“ं เค•ा เคฏोเค— เคฆेเคคा เคนै। เคชाเคฏเคฅเคจ เคฎें เคเคกिเคถเคจ เค‘เคชเคฐेเคŸเคฐ เค•ो เคช्เคฒเคธ เคšिเคน्เคจ (+) เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เค‡เคธเค•ा เค‰เคชเคฏोเค— เคฆो เคฏा เคฆो เคธे เค…เคงिเค• เคธंเค–्เคฏाเค“ं เค•ो เคเค• เคธाเคฅ เคœोเคก़เคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เค†เคช เคชूเคฐ्เคฃांเค• เค”เคฐ เคซ़्เคฒोเคŸिंเค—-เคชॉเค‡ंเคŸ เคธंเค–्เคฏाเค“ं เคฆोเคจों เค•े เคธाเคฅ เค…ंเค•เค—เคฃिเคคीเคฏ เคธंเคšाเคฒเคจ เค•เคฐเคจे เค•े เคฒिเค เค…เคคिเคฐिเค•्เคค เค‘เคชเคฐेเคŸเคฐ เค•ा เค‰เคชเคฏोเค— เค•เคฐ เคธเค•เคคे เคนैं। เค‡เคธเค•े เค…เคคिเคฐिเค•्เคค, เค†เคช เค‡เคธเค•ा เค‰เคชเคฏोเค— เคธ्เคŸ्เคฐिंเค— เค•ॉเคจ्เคธเคŸेเคจेเคถเคจ เค•े เคฒिเค เค•เคฐ เคธเค•เคคे เคนैं, เคœिเคธเค•ा เค…เคฐ्เคฅ เคนै เคฆो เคฏा เคฆो เคธे เค…เคงिเค• เคธ्เคŸ्เคฐिंเค—्เคธ เค•ो เคเค• เคธाเคฅ เคœोเคก़เคจा।

    This operator returns the sum of two numbers. The addition operator in Python is represented by the plus sign (+). It is used to add two or more numbers together. You can use the addition operator to perform arithmetic operations with both integers and floating-point numbers. Additionally, you can use it for string concatenation, which means combining two or more strings together.


syntax: x + y
example: 3 + 2
result: 5

Subtraction [ - ]

    เคฏเคน เค‘เคชเคฐेเคŸเคฐ เคฆो เคธंเค–्เคฏाเค“ं เค•ा เค…ंเคคเคฐ เคฆेเคคा เคนै। เคชाเคฏเคฅเคจ เคฎें, เค˜เคŸाเคต เค‘เคชเคฐेเคŸเคฐ เค•ो เคนाเค‡เคซ़เคจ (-) เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคœाเคคा เคนै। เค‡เคธเค•ा เค‰เคชเคฏोเค— เคฆाเคนिเคจी เค“เคฐ เค•े เคฎाเคจ เค•ो เคฌाเคฏीं เค“เคฐ เค•े เคฎाเคจ เคธे เค˜เคŸाเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै।

    This operator returns the difference of two numbers. In Python, the subtraction operator is represented by the hyphen (-). It is used to subtract the value on the right-hand side from the value on the left-hand side.


syntax: x - y
example: 3 - 2
result: 1




NEXT:-



---END---

Comments