the numeric type resulting from an arithmetic operation depends on the type of the two operands if at least one operand is floating-pointthe result will be floating-point and if both operands are integersthe result will be an integer an exception is the real division operator (/)which always returns floating-point the floor division operator (//mathematically computes ba/bc but returns an integer if both operands are integers and floating-point if at least one is floatingpoint the modulo operator (%returns the remainder left after computing floor division the operators have the expected order of precedence as found in mathematics but can be overridden using parentheses all of the operatorsexcept the power operator (**)are evaluated from left to right special care must be taken when using the power operator with negative literal values negative literal on the left side of the power operator is treated differently than one on the right side for examplethe python expression - * is evaluated as -( * while the expression *- is evaluated as *(- python also supports the compound assignment operators that combine an assignment with an arithmetic operator+-*/%**//these operators perform the arithmetic operation on both operands and store the result back in the variable on the lefthand side for examplethe expression + is equivalent to the arithmetic new in python xthe functionality of the division operator (/has changed it now performs real division and returns floating-point value even if both operands are integers the floor division operator (//has to be used for integer division logical expressions decisions in programming language are made based on the boolean result (true or falseof logical expression logical expressions are constructed using logical operatorswhich can be divided into two groupsrelational operators and boolean operators relational operators the relational operators are used to determine if given relationship exists between pairs of values for examplewe may want to determine if student has failing grade where failing is any average below the logical expression for that evaluation would be written asavg > the result of which is either true or false the relational operators can be used with any of the built-in types the numeric values are compared by relative mag