Bonus Level 1 Reversing Text 2026
The code we’ll use is:
Talking it through:
Reversing text isn’t a very strong cipher – but a version of reverse text writing was used by Leonardo DaVinci (alongside mirror writing) to try to prevent other people stealing his ideas.
Let’s start by telling the person using the program what to do. The following will print the message in the speech marks:
Next we need an input to allow the person to enter some text. We will call this input ‘code’
Next we need to think about what we want to achieve. Take the word HELLO – we want this to return OLLEH.
If we mark the index of the initial plaintext message (with 0 being the first position) we can see that H is assigned 0, E is 1, L is 2 etc. Next we see what happens to these letters when their position is reversed.
We can see that on the cipher text we need to have the letter O first which was assigned index 4 in our plaintext. We can see that the indexes of the plain and cipher letters will always equal 4.
For a plaintext of length k, the index will always add up to k-1 ( This is because we start with index 0 not 1). So If we are given the plaintext letter with index n then the cipher letter index will be ” k− 1 − n.
For example with HELLO we have a length of 5 letters so k = 5. When n = 1 the plaintext index for 1 is E. This code to return the letter with index given by 5−1−1 = 3. The letter with index 3 is L. It works, so let’s build this code!
First let’s store the length of the code:
And then we run through the initial indexes. (Note that n will start at 0 but stop at k − 1):
And then we want to print the code with index k − 1 − n
Putting it all together we have the finished code:
We can now check this works. Let’s put in HELLO to check it does indeed do what it’s supposed to:
Yes – it works!
Your challenge:
So, your challenge is to correctly type this code into an online Python editor like: https://www.online-python.com. (Python is sensitive to spacing – so make sure you have a space on the last line).
Use your code to decrypt the following message. This will give you the password to access the next level.

When you have designed your code, click here to enter your password.










