Hello i just need a Pseudo-code for the following python code And a…
Question Answered step-by-step Hello i just need a Pseudo-code for the following python code And a… Hello i just need a Pseudo-code for the following python code And a comments for Each line Purpose thanks :)) # def encrypt_Caesar(a):# c = (x-n)%26alpha = “abcdefghijklmnopqrstuvwxyz”ALPHA = alpha.upper()alphabet = alpha+ALPHAdef convert_to_Caesar(input_to_Caesar: str): replaceString = “” for elem in input_to_Caesar: if elem.isalpha() or elem == ‘.’: replaceString += elem replaceString = replaceString.replace(‘.’, ‘X’) replaceString = replaceString.upper() return replaceStringdef encrypt_Caesar(target, shift): for index in range(len(alphabet)): if alphabet[index] == target: x = index + shift y = x % len(alphabet) return (alphabet[y])string = input(“Enter The String: “)string = convert_to_Caesar(string)while True: try: shift = int(input(“Enter a shift number: “)) break except ValueError: print(“Please input an integer only”) continueencrypted_string = ”for x in string: if x == ”: encrypted_string += ‘ ‘ else: encrypted_string += encrypt_Caesar(x, shift)print(“Encrypted string : ” + encrypted_string)shift = -shift # Reverse decrypted_string = ”for x in encrypted_string: if x == ‘ ‘: decrypted_string += ‘ ‘ else: decrypted_string += encrypt_Caesar(x, shift)print (“Decrypted string : “+ decrypted_string) Computer Science Engineering & Technology Python Programming BSB WHS405 Share QuestionEmailCopy link Comments (0)


