Demo Sample Trick:Number Revealer

  Blog    |     February 04, 2026

Here's a fun mathematical trick that reveals a number between 1 and 10 through a series of calculations. The user performs operations on their chosen number, and the final result reveals the original number:

print("Multiply it by 5")
print("Add 25")
print("Multiply by 2")
print("Subtract 50")
result = int(input("Now, what's your final number? "))
original = result // 10
print(f"Your secret number was: {original}")

How It Works:

  1. User thinks of a number (e.g., 7).
  2. Multiply by 5:
    7 × 5 = 35
  3. Add 25:
    35 + 25 = 60
  4. Multiply by 2:
    60 × 2 = 120
  5. Subtract 50:
    120 - 50 = 70
  6. Final input: User enters 70.
  7. Calculation:
    70 // 10 = 7 (original number revealed).

Key Insight:

The operations transform the original number x into 10x + 50 - 50 = 10x. Dividing by 10 (// 10) extracts x.

Try It Yourself:

  1. Run the code.
  2. Follow the instructions with your number.
  3. The program reveals your original number!

Example Output:

Think of a number between 1 and 10 (keep it secret!)
Multiply it by 5
Add 25
Multiply by 2
Subtract 50
Now, what's your final number? 70
Your secret number was: 7

Request an On-site Audit / Inquiry

SSL Secured Inquiry