Nov-02-2018, 09:42 PM
Thank you for the clarification--- I don't understand why the computer doesn't understand what I meant with cleartext_lowercase(). You understood what I was trying to do, how come computers can't?? What is with the computer and it's thinking??
alphabet= "abcdefghijklmnopqrstuvwxyz" cleartext= input() cleartext=cleartext.lower() def encrypt(cleartext): codedtext = " " for character in cleartext: if character in alphabet: newcharacter= (alphabet.find(character) + 13) %26 codedtext += alphabet[newcharacter] else: codedtext += character return codedtext print(encrypt(cleartext))Now when i run the program with sheep as my input, all I get is f---- the other letters are not showing up. f goes with s, but what about heep?? This should be working because I have codedtext+=alphabet[newcharacter].