Question: A keyword cipher relies on two keys like the affine cipher, but instead of being two numbers, we need a key word and a key

A keyword cipher relies on two keys like the affine cipher, but instead of being two numbers, we need a key word and a key letter. Given a keyword and key letter you can construct a keyword cipher by following these instructions:

  1. Eliminate all duplicates of letters from the keyword.
  2. Beginning at the position of the key letter in the alphabet, write the letters of the duplicate-free form of the keyword.
  3. Write the remaining letters of the alphabet in their natural order after the last keyword letter, wrapping around if necessary.

For example, suppose our keyword is ``mathematics'' and key letter is "f". When we remove all the duplicate letters from ``mathematics'' we are left with "matheics''. We would obtain the following cipher,

a b c d e f g h i j k l m n o p q r s t u v w x y z
V W X Y Z M A T H E I C S B D F G J K L N O P Q R U

Please use python to write this program thank you!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!