(Oct-12-2017, 07:16 AM)gruntfutuk Wrote: Did you follow the advice given in the video I posted a link to?
Whilst it is good to have Pycharm tidy up, it cannot know what you intended and can leave things at the wrong level of indentation.
I looked at the video and I get the indentation a bit better but i'm still lost. But I still don't know if my first 2 steps of the code for choice 2 are correct here's what I currently have without any indentation errors
for i in range (len(passwords)): if passwordToLookup in passwords [i][0]: encryptionKey=-16 def passwordunEncrypt (encryptedMessage, key): unencryptedMessage = '' for symbol in encryptedMessage: if symbol.isalpha(): num = ord(symbol) num -= key if symbol.isupper(): if num > ord('Z'): num -= 26 elif num < ord('A'): num += 26 elif symbol.islower(): if num > ord('z'): num -= 26 elif num < ord('a'): num += 26 unencryptedMessage += chr(num) else: unencryptedMessage += symbol return unencryptedMessage print(unencryptedMessage)if the above steps are correct then i'm supposed to add the code for encryption (which is given) and turn in into decryption i'm told to decrypt is the exact reverse operation of encryption. I tried to turn every occurence of "encrypt" into "unencrypt" but when I run the code it doesnt return a decrypted password