← Back to challenges

Mystery Challenge

PythonHardalgorithmsloops

Instructions

Write a function that takes an integer n and turns it into the ouput. No further instructions.

Examples

mystery_func(521) ➞ "151211"

mystery_func(5211255) ➞ "1512211225"

mystery_func(513515) ➞ "151113151115"

Notes

  • The result has to do with counting something.
  • Check the Tests tab for some extra hints.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.