PROJECT 7
Cryptopy
The muscles you used in the 1337 sp34k3r project get flexed in this project, too. You encrypt and decrypt messages using Python and a little something called a Caesar Cipher.
Julius Caesar was a Roman general. Ciphers are what real-life spies use to make and break codes. A cipher is a procedure or a device that changes readable text (called plaintext) into unreadable text (called ciphertext). Caesar encrypted, or coded, his messages by shifting letters along the alphabet. If he had a plaintext d, he would replace it with an a. For an e he would write b, and so on.
In this project you
- Take a plaintext message.
- Encrypt the message.
- Present the encrypted message.
- Decrypt a ciphertext message into plaintext.
- Present the plaintext.
Your cipher is going to handle uppercase and lowercase letters, plus punctuation marks and numbers. Caesar got off easy. He didn’t have to worry about punctuation or uppercase letters.
Get Python For Kids For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.