PYTHON MINI CHALLENGE
Emma Bateman is a software engineer based in the US. She holds a Bachelor of Science (B.S.), Computer science and a Master of Computational Linguistics.
In this project, you will have to create a keyword cipher, a program to encrypt or decrypt a message taking a keyphrase as input. You will have to combine a keyword cipher and shift cipher to encrypt and decrypt strings.
A cipher is a method to encrypt a string of text. One of the simplest ciphers is a shift cipher. It replaces each letter in a string with the following letter in the alphabet according to the number defined.
For example, using the number 3, the string ‘CAB’ would become ‘FDE’.
A keyword cipher is a little bit more complex and therefore more difficult to crack.
You are requested to write a program with a simple command line interface so that users can provide the inputs required. You will have to create functions to build encoder/decoder dictionaries, and to encode/decode the message. The whole program is written with dictionaries, “for” loops, if/else statements, functions and lists, so it is a great exercise to practice these Python topics.
DOWNLOAD / CONTENT
You will receive an email with a ZIP file. The download is also available on your account.
The ZIP file includes:
1) INSTRUCTIONS: A PDF with the project description. It includes an introduction section explaining briefly what a cipher is and how it works. There is also a guidelines section that breaks down the challenge in several exercises so you can complete the assignment step by step.
2) SOLUTIONS: A Jupiter Notebook including detailed explanations and comments about how the code works. The code provided in the solutions (90 lines) has been written by a senior developer, so it is clean and easy to understand. A great way to learn and adopt right habits to create quality software.
IMPORTANT: To see the solutions (Notebook) you need to have Jupyter or the ANACONDA package installed on your machine. If you do not have it, you may download it here. It is free.
WHAT YOU WILL PRACTICE
– Lists comprehension.
– Conditional statements.
– Loops (for).
– Function creation.
This project is highly recommended for intermediate Python students feeling comfortable with core Python concepts like loops and data structures.
If you need additional information, do not hesitate to contact us.