I pasted the code here: http://codepaste.net/hy5n6m .
In that version creating a cypher is no problem but decrypting a code doesn't work. I've only gotten it to work a couple times and I lost those versions (because something else always went wrong there).
I have a couple other versions which don't work either but that's the most recent one. Another one reversed the letters in the wrong order and another one never reversed the first letter. Can anyone point me in the right direction? I've spent over 6 hours on this assignment which was supposed to be really simple.