diff --git a/cse16260_ex2_q9.py b/cse16260_ex2_q9.py new file mode 100644 index 0000000000000000000000000000000000000000..d57e90dad4260b926c52f5e0b52c28b9f98022b0 --- /dev/null +++ b/cse16260_ex2_q9.py @@ -0,0 +1,12 @@ +str=input("enter a string :") +shift=int(input("enter the value of the shift amount")) +s="" +for i in str: + if i==' ': + s=s+i + elif i.isupper(): + s=s+chr(int(ord(i)+shift-65)%26+65) + else: + s=s+chr(int(ord(i)+shift-97)%26+97) +print(s) +