Here is how http://scratch.mit.edu/projects/zorket/1991214 works. It's complicated!
So, you pick a number 1 - 10. I don't know what it is, So I call it X. The project also picks 2, 4, 6, or 8 for the magic. I know what that is, but I call it Y.
I ask you to multiply it by 2, so that is x * 2 or 2x.
Now, you add Y, so it looks like this: 2x + y.
Divide it all by 2:
2x divided by 2 is x,
y divided by 2 is (y / 2)
All together: x + (y / 2).
Now you subtract it by your original number, so x + (y / 2) turns into just (y / 2)
(y / 2) turns into your final answer!
Do the math:
x * 2 = 2x
2x + y = 2x + y
2x + y / 2 = x + (y / 2)
x + y / 2 - x = (y / 2)
(y / 2) = Answer
Offline