Python Arithmetic Operators
Python Arithmetic Operators
Arithmetic operators are used with numeric values to perform common mathematical operations:
Operator | Name | Example | Try it |
---|---|---|---|
+ | Addition | x + y | Try it ยป |
- | Subtraction | x - y | Try it ยป |
* | Multiplication | x * y | Try it ยป |
/ | Division | x / y | Try it ยป |
% | Modulus | x % y | Try it ยป |
** | Exponentiation | x ** y | Try it ยป |
// | Floor division | x // y | Try it ยป |