Python provides operators, which are
special symbols that represent computations like addition and multiplication.
The operators +, -, and * perform addition, subtraction, and multiplication, as shown below
eg:
>20 + 15
35
> 23 - 1
22
> 9 * 8
72
The operator / performs division:
> 24 / 2
12.0
the operator ** performs exponentiation; that is, it raises a number to a power:
> 2**2 + 5
9
bitwise operator
called XOR.
> 10 ^ 4
14
special symbols that represent computations like addition and multiplication.
The operators +, -, and * perform addition, subtraction, and multiplication, as shown below
eg:
>20 + 15
35
> 23 - 1
22
> 9 * 8
72
The operator / performs division:
> 24 / 2
12.0
the operator ** performs exponentiation; that is, it raises a number to a power:
> 2**2 + 5
9
bitwise operator
called XOR.
> 10 ^ 4
14
Comments
Post a Comment