152k views
5 votes
First, define an integer variable and assign it any value of your choice. Then you'll need to perform the following operations with it:

1. Add 9
2. Multiply by 2
3. Subtract 4
4. Divide by 2
5. Subtract by the variable's original value
6. Finally, display what the end result is.
7. Once your math / code is complete, double check your work by seeing what happens with the end result when you use different starting values. You should notice something "interesting".

User Baba Yaga
by
3.9k points

1 Answer

5 votes
Python code:

x=121
x += 9
x *= 2
x -= 4
x >>= 2
x -= 121
User Brant Messenger
by
4.8k points