python-operators

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

+=

Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand.

+

Addition - Adds values on either side of the operator.

&

Binary AND Operator copies a bit to the result if it exists in both operands.

<<

Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand.

|

Binary OR Operator copies a bit if it exists in either operand.

~

Binary Ones Complement Operator is unary and has the effect of 'flipping' bits.

>>

Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand.

^

Binary XOR Operator copies the bit if it is set in one operand but not both.

and

Called Logical AND Operator. If both the operands are true then condition becomes true.

not

Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false.

or

Called Logical OR Operator. If any of the two operands are non zero then the condition is true.

>=

Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true.

>

Checks if the value of left operand is greater than the value of right operand, if yes then the condition becomes true.

<=

Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.

<

Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.

!=

Checks if the value of two operands are equal or not, if value are not equal then condition becomes true.

<>

Checks if the value of two operands are equal or not, if values are not equal then condition becomes true.

==

Checks if the value of two operands are equal or not, if yes then condition becomes true.

/=

Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand.

/

Division - divides left hand operand by right hand operand.

is not

Evaluates to false if the variables on either side of the operator point to the same object and true otherwise.

not in

Evaluates to true if it does not find a variable in the specified sequence and false otherwise.

in

Evaluates to true if it finds a variable in the specified sequence and false otherwise.

is

Evaluates to true if the variables on either side of the operator point to the same object and false otherwise.

**

Exponent - Performs exponential (power) calculation on operators.

**=

Exponent AND assignment operator, Performs exponential (power) calculation on operators and assign value to the left operand.

//

Floor Division - The division of operands where the result is the quotient in which the digits after the decimal point are removed.

//=

Floor Division and assigns a value, Performs floor division on operators and assign value to the left operand.

%

Modulus - Divides left hand operand by right hand operand and returns remainder.

%=

Modulus AND assignment operator, takes modulus using two operands and assign the result to left operand.

*

Multiplication - Multiples values on either side of the operator.

*=

Multiply AND assignment operator, It multiples right operand with the left operand and assign the result to left operand.

=

Simple assignment operator, assigns values from right side operands to left side operand.

-=

Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand.

-

Subtraction - Subtracts right hand operand from left hand operand.


Ensembles d'études connexes

Insights 8 Glossary: Development aid

View Set

Pro Selling Final Exam- CH 13-17

View Set

Clinical Manifestations of Gallbladder Disease

View Set