Posts

Showing posts from December, 2018

An Encryption And Decryption Program

It's back to the schedule, so here's my latest creation . A python program that does encryption and decryption in both the Caesar Cipher and the Vigenère Cipher. When given a message with a key, the program shall input the two into an encryption function which will return the encrypted message unless there are errors. For show, the encrypted message is outputted to the console and then placed into the decryption function along with its key, which returns the message decrypted. The Caesar Cipher does the following: Get the message and key Validate message and key  Make sure the message is a string made up of ASCII characters (and only visible ones; the ones from char 33 to 126) and the key is an integer  Print to console the problems and stop if validation fails For every letter in the message  Get the current letter and its ASCII number  If the ASCII number of the current letter plus the key is above 126  Add to the output string the character with an ASCII n

My Two Projects for Finals

Image
So it has been almost a month since my last post. It's been a busy time. I have to dealt with final projects in all of my classes and had to study for various exams. With Thanksgiving and a relative's graduation, I had to also do various things with my family. One other thing I had to do is my programming class' final project. So for my first programming class I had to create two programs: One that gets a number in its numerical form and then state the number as words instead of numbers. One which will translate a number in one base and translate it to another base, such as translating a number from binary to hexadecimal. These were probably the hardest programs I've ever made so far. I had to learn various code pieces such as dictionaries and chars. Much time had to be put into them, and countless times did they have errors while running. Nevertheless, I shall go into what I have made. Number to Word Translator This is a simple program to which takes a n