1 hour ago · 10 min read2028 words · Tech · hide · 0 comments

A Caesar cipher is a letter for letter exchange from a clear text to a encrypted text by shifting a set distance in the alphabet. Thus, if your set distance is 2, the letter A becomes C, the letter X becomes Z. To encrypt the last letters of the alphabet, you wrap around to the beginning, so Y becomes A and Z becomes B. Caesar is commonly respelled to Ceasar, which I have done for this article. Use the spelling of your choice.This is a fairly easy algorithm to code, and makes for a decent early class in python. Here are the steps I would go through to teach someone: I would do this on Linux, of course, using vim, but that is my problem. I won’t go into editor usage. Start by writing and executing a hello_world program: vim ceasar.py: #!/bin/python3 print("OK") Make the file executable. chmod +x ceasar.py Run the program. ./ceasar.py OK Always work from success. Don’t try to do more until you can get this far. Make sure you understand what you have done. The Line !/bin/python3 tells…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.