Substitution Ciphers

Step 1 – Using ASCII code

067 111 100 101 115 032 097 114 101 032 099 111 111 108

This is ASCII code.

ASCII code is used to store the keys you press on the keyboard.

It has to be numbers because everything stored on a computer has to eventually become a number. They only work with numbers.

Because computers use ASCII code there's a quick and easy way to convert a character in Python to ASCII.

Converting to ASCII code

Start by trying this program:

Code image

This is very simple, but only works with a single character. Anything else crashes the program so it's not good for a full message.

The program works using the command ord() . This just converts the character into ASCII code.

Save the program and run it. Try entering a single letter. It should give you a number somewhere between 065 and 123.

Then try it with a single number (0 to 9).

And then try some single keyboard symbols (& for example), space etc...