CSCI-UA.0004 - Python - Summer 2016 - Nathan Hull
ASSIGNMENT 10
Due: Thursday, August 11th
Write a program which DECRYPTS the secret messages which are created by the
ENCRYPT program which we went over in class.
It should first prompt the user for the scrambled alphabet which was created
by ENCRYPT (which you should be able to copy & paste from the preceeding program's
run). It then should ask for the secret message. Finally, it outputs the unscrambled
version.
Note that there are exactly 26 characters input for the scrambled alphabet.
All alphabetic characters are translated into their decoded equivalents (which
will take a WHILE loop), and all other, non-alphabetic characters should be
output exactly as they were without translation.
For extra credit, verify that the scrambled alphabet you input has only alphabetic
characters and that they don't duplicate. Put out an error message if you find
a duplicate letter.
Here is a possible sample run:
Please input the scrambled alphabet in order:
XQHAJDENKLTCBZGUYFWVMIPSOR
Now input the scrambled message:
VNKW KW BO 1WV WJHFJV BJWWXEJ!
Your unscrambled message reads:
THIS IS MY 1ST SECRET MESSAGE!