Study the circular Caesar cipher problem presented in Progra
Solution
def encryptOrDecrypt(msg, shift):
    msg = msg.lower()
    encryptedText = \"\"
    for c in msg:
        if c in \"abcdefghijklmnopqrstuvwxyz\":
            num = ord(c)
            num += shift
            if num > ord(\"z\"): # wrap if necessary
                num -= 26
            elif num < ord(\"a\"):
                num += 26
            encryptedText = encryptedText + chr(num)
        else:          
            encryptedText = encryptedText + c
    return encryptedText
def encrypt(msg,shift):
    return helper(msg, shift)
def decrypt(msg,shift):
    return helper(msg,-1* shift)
 # main program
 msg = input()
 shift = -1
 while(shift < 0)
    shift = input()
 encryptedText = encrypt(msg,shift)
 print(\"The encoded msg is:\", encryptedText)
 msg = decrypt(encryptedText,shift)
 print(\"The decoded msg is:\", msg)

