#!/usr/bin/python3 # -*- coding: utf-8 -*- key: int = int(input("\nEnter your Caesar key in numeric form (1-25): ")) mode: int = int(input("\nEnter 1 for encryption, and 0 for decryption: ")) character: int = int( input("\nEnter the Caesar encoding of the first character of your message: ") ) while character != -1: print("\tYour letter translated to:") # Does using a loop help here? If yes, why? If no, why? if mode == 1: # 26 is the symbol set size (# letters in alphabet) print("\t", (character + key) % 26) else: print("\t", (character - key) % 26) character = int( input("\nEnter the Caesar encoded next character, or -1 for done: ") ) print("\nend of Caesar encoded message\n")