If we start with the 1 button and jump across the 5, we get to 9. The 6 jumps the 5 to become 4, and so forth. The numbers 5 and 0 will swap with each other.
In this exercise, we’re going to write a Python program called jump.py that will take in some text as a positional argument. Each number in the text will be encoded using this algorithm. All non-number text will pass through unchanged. Here are a couple of examples:
$ ./jump.py 867-5309 243-0751 $ ./jump.py 'Call 1-800-329-8044 today!' Call 9-255-781-2566 today!