Write a Python program to input a sentence from the user and then create an encoded version of the sentence by using the following rules. Finally print the original and the encoded sentences. The rules to be followed are
Enter Sentence: 2nd October
Original Sentence = 2nd October
Coded sentence = 2rh!Rgxsfiv
Enter Sentence: The 36th Chamber of Shaolin
Original Sentence = The 36th Chamber of Shaolin
Coded sentence = Wli!36xl!Fleqfiv!sj!Vlepmr
strin=input("Enter A String : ") strout="" for x in strin: k=ord(x) if (k==32): strout +="!" elif(k>=65 and k<90): k=k+3 if(k>90): k=k-26 strout += chr(k) elif(k>=97 and k<=122): k=k+4 if(k>122): k=k-26 strout += chr(k) else: strout +=chr(k) print("Original Sentence = ",strin) print("Coded Sentence = ",strout)