More Arithmetic Operators
More Arithmetic Operators
Modulus
To find the remainder, we use Modulus operator
%
- a % b
Code
PYTHON
Output
Exponent
To calculate a power b, we use Exponent Operator
**
- a ** b
Code
PYTHON
Output
You can use the exponent operator to calculate the square root of a number bu keeping the exponent as
0.5
Code
PYTHON
Comments
Post a Comment