![]() But if one of the operands is negative, the result is floored, i.e., rounded away from zero (towards negative infinity) −ĩ//2 = 4 and 9.0//2.0 = 4.0, -11//3 = -4, -11.0//3 = -4.0 Performs exponential (power) calculation on operatorsįloor Division - The division of operands where the result is the quotient in which the digits after the decimal point are removed. Multiplies values on either side of the operatorĭivides left hand operand by right hand operandĭivides left hand operand by right hand operand and returns remainder Subtracts right hand operand from left hand operand. ![]() ![]() Python Arithmetic OperatorsĪssume variable a holds 10 and variable b holds 20, then −Īdds values on either side of the operator. Let us have a look on all operators one by one. Python language supports the following types of operators. ![]() Here, 4 and 5 are called operands and + is called operator. Operators are the constructs which can manipulate the value of operands.Ĭonsider the expression 4 + 5 = 9. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |