#!/usr/bin/python3 # -*- coding: utf-8 -*- print("You have to run this program, once for every character of your message") key: int = int(input("\nEnter your Caesar key in numeric form (1-25): ")) mode: int = int(input("\nEnter 1 for encryption, and -1 for decryption: ")) encoded_char: int = int( input( "\nEnter Caesar encoded number corresponding to one character of your message:" ) ) print("\nThe translation of your character is:") # 26 is the symbol set size (# letters in alphabet) # negative mod is language dependent in behavior print((encoded_char + (key * mode)) % 26)