Keyword Cipher decrypter
Hello! I am working on a Keyword Cipher decrypter, and I am having trouble making python do what I want.
Keyword cipher is a type of cipher. The first letter of the keyword is placed at the key-letter, the sencond letter of the keyword is placed at the letter after the key-letter, and so on. The rest of the letters just go from A-Z. However, you cannot repeat letters, aka, letters from the keyword cannot be written again later.
WHAT I WANT PYTHON TO DO & WHAT PYTHON IS DOING:
I want python to be able to decrypt a Keyword Cipher, but python keeps getting stuck at one of the steps. The only thing python is doing wrong is avoiding repeation.
▪ Python doesn't accept repeated letters in the keyword.
▪ Python can do everything except avoiding repeation.
▪ I don't have any ideas for fixing this issue.
link to my code ⬇
link to keyword cipher definition ⬇
Please put suggestions for fixing my code, and questions about my code in the comments below.
Thank you for your time and consideration.
There’s actually a very similar program I found and can used as a guideline to compare Ciphers in python. It uses a similar formatting system and is really helpful. Btw, what is a “Key Letter?” Is is necessary for the program to function? In my program, I type in a command (/keyword) in advance and it scrambles the letters. The only issue I found is that the letters scrambled are in a fixed position. Meaning they are the same every time. If I figure that out, it should work better. Could you also explain what this program really does. I am pretty new to Ciphers and the whole idea is a bit confusing. Below is a screenshot of a example I did.
Best of luck,
Here is the program of the Keyword Cipher