Assignment operators not making sense

Came across this problem.

I get the first one, but the last 3 are confusing.

How does:

6 /= 3 = 4. Shouldn’t that be 2?
6 -= 1 = 1. Shouldn’t that be 5?
6 += 3 = 6. Shouldn’t that be 9?

Please advise.

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Remember that the value of num is changing with each line. It doesn’t get reset to 6 between lines.

6 * 2 = 12

12 / 3 = 4

4 - 1 = 3

3 + 3 = 6

1 Like

Ok. That makes sense now.