🔹 1. Arithmetic Operators: Used for basic mathematical calculations.
Operator | Description | Example |
---|---|---|
+ | Addition | a + b |
- | Subtraction | a - b |
* | Multiplication | a * b |
/ | Division | a / b |
% | Modulus (Remainder) | a % b |
** | Exponentiation | a ** b |
++ | Increment | a++ |
-- | Decrement | b-- |
🔹 2. Assignment Operators: Used to assign values to variables. These operators let you store data in variables.
Operator
= (Assignment)
+= (Addition assignment)
<= (Less than or equal to assignment)
= (Greater than or equal to assignment)
/= (Division assignment)
%= (Modulus assignment - assigns the remainder)
🔹 3. Comparison Operators: Used to compare two values.