118 days ago · 10 min read2028 words · Tech · hide · Fediverse post

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…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town