python 3.x - Stuck on Encryption with a keyword -
i using python3.4.1. appreciated
text = (str(input('enter message here, in upper case'))) key = (str(input('enter key word here, in upper case'))) in range (0,len(text),1): code = ord((text[a])+(ord(key[a%len(key)]))-64) if (text[a]==' '): print(' ', end= '') elif code > 90: print(chr(code + 26), end = '') else: print(chr(code), end = '')
Comments
Post a Comment