[Tutor] My Program stopped working, can anyone help
dukelx2005 at gmail.com
Wed Apr 1 12:06:41 CEST 2009
I am trying to produce A Caesar cipher is a simple substitution cipher ,
that would code For example, if the key value is 2, the word “Sourpuss”
would be encoded as “Uqwtrwuu
Here is my code: ( but i keep getting a ERROR) It works for me Last week but
for some reason it isnt work for me right now. ANY REASON WHY PLEASE
# Simple string processing program to generate an encryp text
print "This program will encode your messages using a Caesar Cipher"
key = input("Enter the key: ")
message = raw_input("Enter the message: ")
codedMessage = ""
for ch in message:
codedMessage = codedMessage + chr(ord(ch) + key)
print "The coded message is:", codedMessage
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor