28. Augmented Assignment Operator Flashcards

1
Q

What does augment assignment operator do?

A

Instead of doing this to add 5 to 2:

some_value = 5
some_value = some_value + 2
,you do this instead, and just add += to add both numbers
some_value = 5
some_value += 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how do you subtract?? multiply??

A

some_value = 5
some_value-=2
3

multiply
*=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly