Skip to content
Snippets Groups Projects
Commit 9db67b32 authored by D Vengatesh's avatar D Vengatesh
Browse files

ex2 q9 done

parent e5002636
Branches
No related tags found
No related merge requests found
Pipeline #61 canceled
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment