diff --git a/CSE16237_Ex02_09.py b/CSE16237_Ex02_09.py new file mode 100644 index 0000000000000000000000000000000000000000..ba3f67918ebc5d10fd4fc442d82a10164110b46e --- /dev/null +++ b/CSE16237_Ex02_09.py @@ -0,0 +1,11 @@ +st=input("Enter string to be encrypted:") +shift=int(input("Enter shift amount:")) +s1="" +for i in st : + 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)