Your number was...

Think of a number and follow my instructions. Tell me your answer, and I'll tell you what you started with! Can you explain how I know?

Problem

This problem follows on from Your Number Is...

Press the button in the interactivity below to investigate what this machine does:

Try starting with other numbers - maybe decimals or negative numbers.

How is the machine working out your starting number?

Can you explain the connection between the machine's instructions, and what the machine is doing to work out the original number?

 

Can you devise your own set of instructions, and then deduce someone else's starting number from their final number, in the same way?

Can you devise a set of instructions with more than three steps?

You can use the interactivity to test your ideas:
In the "Settings" menu for the interactivity, you can edit the functions used by the machine. Click below to learn more.
 

To access the settings menu, click on the purple cog in the top right corner of the interactivity. The screenshot below shows the menu:

 

Image
Your number was...

 

You can enter your own sequence, separated by hyphens, using the code "a" for add, "s" for subtract, "m" for multiply and "d" for divide. The sequence a4-m2-s7 in the screenshot represents "Add 4, Multiply by 2, Subtract 7". 

Once you have entered your chosen sequence, click to load it in the current window or a new resizable window.