About assignment operators
Symbol assignment to variables is performed
Understand the assignment
- Assignment is labeling
- Illustrates definitions of variables
- Illustrates a variable value change
- Defined function illustrated
- Illustrates a = function name
- Situation is illustrated confusion assignment (number, function, string)
Assignment Operators
Operators | description | Examples |
---|---|---|
= | Simple assignment operator | c = a + b a + b is the assignment of the operation result c |
+= | Addition assignment operator | c + = a is equivalent to c = c + a |
-= | Subtraction assignment operator | c - = a is equivalent to c = c - a |
*= | Multiplication assignment operator | equivalent to c * = a c = c * a |
/= | Division assignment operator | c / = a is equivalent to c = c / a |
//= | Assignment operator take divisible | c // = a is equivalent to c = c // a |
%= | Take modulus (remainder) assignment operator | c% = a is equivalent to c = c% a |
**= | Power assignment operator | c ** = a is equivalent to c = c ** a |
- When the assignment to do gymnastics, will first operation data to the right of the equal sign