The Caesar Cipher technique is one of the earliest and simplest method of encryption technique. It’s simply a type of substitution cipher, i.e., each letter of a given text is replaced by a letter some fixed number of positions down the alphabet. For example with a shift of 1, A would be replaced by B, B would become C, and so on. The method is apparently named after Julius Caesar, who apparently used it to communicate with his officials.For the given input string(S) and shift print the encrypted string.
Sample Testcase :
INPUT
ABCdEFGHIJKLMNOPQRSTUVWXYz 23
OUTPUT
XYZaBCDEFGHIJKLMNOPQRSTUVw
My code:
a,b=input().split(" ")
b=int(b)
string=""
for i in range(b,len(a)):
string=string+a[i]
for i in range(0,b):
string=string+a[i]
print(string)
output:
>> Compiling your code
Output:
XYzABCdEFGHIJKLMNOPQRSTUVW
Execution Time:
>>> 0.02s
Memory Used:
>>> 3264kb
need to change output to this XYZaBCDEFGHIJKLMNOPQRSTUVw
please help me