diff --git a/CSE16261_Ex02_09.py b/CSE16261_Ex02_09.py new file mode 100644 index 0000000000000000000000000000000000000000..c507066beaee8a8d4cb8284b841e649af657cbe4 --- /dev/null +++ b/CSE16261_Ex02_09.py @@ -0,0 +1,11 @@ +s=input("Enter the string to be encrypted:") +shift=int(input("Enter the shift amount:")) +s1="" +for i in s : + if i==' ' : + s1=s1+i + elif i.isupper(): + s1=s1+ chr(int(ord(i)+shift-65)%26+65) + else: + s1=s1+chr(int(ord(i)+shift-97)%26+97) +print(s1)