Python

Here a little program in Python to Encrypt your message

The program will reverse the string that the user is providing.

To reverse the string the program will use the ASCII Table.

The program will:

  1. Convert all chars to lower case
  2. Initiate a loop in the string
  3. For each char that is different from a separator (” “)
  4. Convert the char character to ASCII code
  5. Calculate the differential between the ASCII Code of the Character and the ASCII Code 97 (letter a)
  6. Substract from 122 (letter z) the different al in the previous point
  7. Build the String by concatenating each char

Here is the code:

Python Code – Simple Encrypting Program

a=input("Please give me a string")
a=a.lower()
print(a)
mychar=0
mys=""
for x in a:
    if (x!=" "):
        mychar=ord(x)-97
        mychar=122-mychar
        mys=mys+chr(mychar)
     else:
             mys=mys+" "

     print(mys)


Here is a small version of the Program using QT interface