Substitution Ciphers

Step 4 – Adding some style to your program

Run your program from Step 3 again and use "A" as the input – that's a capital A

The output should be 65. But when I showed you ASCII code the first time I wrote each character as a three digit code. So "A" should be 065.

We can add the 0s in. And make the program a little easier to understand as well.

  1. Use a print("Words")  statement to add a sensible title at the beginning of the program
  2. Use print() statements to add blank lines to make the program easier for the user to use
  3. Use a print("Words") statement to tell the user that their converted text is about to be printed out. This will be just before the end of the program
  4. Use the code shown below to add the 0s in front of any number less than 100
  5. Make any other improvements you can think of

Code image

Save your program and run it.

Test it in the same sort of way as before.