Dark theme

Encryption


Every character has a numeric code that represents that character (for example, the number for "A" is 65, and the number for "a" is 97). To get a character's number, use:
ord(character)
To convert a number to a character, use:
char(number)

Given this, write a program that has a function that encrypts text by shifting it up one in the number sequence, and another that decrypts such text by shifting it back down one number. Use this to encrypt and decrypt text entered by the user and show both on the screen.


Hints and one answer