# Project 2: ROT13 Cipher # define the alphabet as one long string alphabet = "xxxxxxx...." # get user input, store it as a string secret_code = xxxxxx # convert to lower case secret_code.xxxxxxx() print(f"Original text: {secret_code}") #initialize empty output string output = "" #for each character in user input for xxxxx in xxxxxxxxxx: # get the position of each letter in the alphabet index = xxxxxxxxxxxxxx # if position not found if xxxxxxxxxxx: # don't translate, write directly to output output += xxxxxxxxx # otherwise else: # shift the character by 13, according to alphabet string index += xxxxxxx # deal appropriately with remainder. If using modulo, this # will do nothing if index is already less than 26 index = xxxxxxxxx # write the output output += xxxxxxxxxxx # print new string (the encrypted message) # It should work in reverse! print(output)