Caesar Cipher Program
<pre><code>def caesar_cipher(message):
    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']
    newmessage = ""
    for letter in message:
        if letter in alphabet:
            positionnumber = alphabet.index(letter) + 13
            position = positionnumber % 26
            newmessage += alphabet[position]
        else:
            newmessage += letter
    print(newmessage)
</code></pre>

<p>How can I get this to change capitals as well?</p>

<pre><code>def caesar_cipher(message):
    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']
    newmessage = ""
    for letter in message:
        if letter in alphabet:
            positionnumber = alphabet.index(letter) + 13
            position = positionnumber % 26
            newmessage += alphabet[position]
        elif letter.isupper():
            positionnumber = alphabet.index(letter.lower()) + 13
            position = positionnumber % 26
            newmessage += alphabet[position].upper()
    print(newmessage)
</code></pre>

<p>Use <code>isupper()</code> to identify capital letters</p>

python