← Back to challenges

Secret Function

PythonHardlogiclanguage_fundamentalsnumbersmath

Instructions

Create a function based on the input and output. Look at the examples, there is a pattern.

Examples

secret(24) ➞ 8

secret(42) ➞ 8

secret(15) ➞ -4

secret(52) ➞ 15

Notes

  • num >= 10 and num <= 52
  • **, * and - can be helpful.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.