8/28/26Less than 1 minuteAbout 125 words
Concept: Integer & Float operators
| Operator | Description | Example | Result |
|---|---|---|---|
+ | Adds two numbers | 5 + 3 | 8 |
- | Subtracts the second number from the first | 5 - 3 | 2 |
* | Multiplies two numbers | 5 * 3 | 15 |
/ | Divides the first number by the second (returns a float) | 5 / 2 | 2.5 |
// | Divides the first number by the second (returns an integer) | 5 // 2 | 2 |
% | Returns the remainder of the division of the first number by the second | 5 % 2 | 1 |
** | Raises the first number to the power of the second | 5 ** 2 | 25 |
< | Less than | 5 < 3 | False |
> | Greater than | 5 > 3 | True |
<= | Less than or equal to | 5 <= 3 | False |
>= | Greater than or equal to | 5 >= 5 | True |