I have programed before (QuickBASIC and Macromedia Flash MX) but I am new on Python
I want to create a program in which you give it a keyword and it generates a cypher.
Like this:
(Built in alphabet)
ABCDEFGHIJKLMNOPQRSTUVWXYZ
(Asks for keyword)
(Lets say the keyword is BLOCK)
BLOCK
(Adds the keyword to the beggining of the alphabet)
BLOCKABCDEFGHIJKLMNOPQRSTUVWXYZ
(Removes repeated letters)
(Prints coded alphabet along with the original alphabet)
BLOCKADEFGHIJMNPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
(And maybe asks for a displacement value)
(Lets say the displacement value is 5)
(Displaces the coded alphabet)
(Prints the coded and displaced alphabet along with the original alphabet)
VWXYZBLOCKADEFGHIJMNPQRSTU
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Here is my code so far:
alphabet = ["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"]
print "Alphabet"
print alphabet
# Lets get the keyword
keyword = raw_input ("What is the keyword?: " )
print keyword
keyword = keyword.upper()
print keyword
alphabet.append(keyword)
print alphabet
# Now somehow remove repeated letters
# And place the keyword at the beggining
By the way I have Python 2.6.2