<div>Hi Jared,</div>
<div> </div>
<div>This is program is working fine for me.</div>
<div>Please check the indentation is proper in it.</div>
<div> </div>
<div> </div>
<div>def main():<br><font color="#ff6600"> print "This program will encode your messages using a Caesar Cipher"</font><br>print<br>key = input("Enter the key: ")<br>message = raw_input("Enter the message: ")<br>
codedMessage = ""<br>for ch in message:<br><font color="#ff6600"> codedMessage = codedMessage + chr(ord(ch) + key)</font><br>print "The coded message is:", codedMessage</div>
<div><br>main()<br></div>
<div> </div>
<div>Sample Execution:</div>
<div>----------------------------</div>
<div> </div>
<div><font color="#3333ff">Enter the key: <font color="#000000">123</font><br>Enter the message: <font color="#000000">Hi Paddy</font><br>The coded message is:<font color="#cc0000"> Ãä›ËÜßßô</font><br>This program will encode your messages using a Caesar Cipher</font></div>
<div> </div>
<div> </div>
<div>-- <br>Ta,<br>Paddy<br>"The Secret to creativity is knowing how to hide your sources " </div>
<div> </div>
<div> </div>
<div class="gmail_quote">2009/4/1 Jared White <span dir="ltr"><<a href="mailto:dukelx2005@gmail.com">dukelx2005@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>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<br><br>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 HELP <img title="Sad" alt=":("> <br>
<br># alphabet.py<br># Simple string processing program to generate an encryp text<br><br><br>def main():<br>print "This program will encode your messages using a Caesar Cipher"<br>print<br>key = input("Enter the key: ")<br>
message = raw_input("Enter the message: ")<br>codedMessage = ""<br>for ch in message:<br>codedMessage = codedMessage + chr(ord(ch) + key)<br>print "The coded message is:", codedMessage<br><br>
<br>main()</div><br>_______________________________________________<br>Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br><br clear="all"><br><br>