Skip to content
Snippets Groups Projects
Commit f8c43e56 authored by K V Ragul's avatar K V Ragul
Browse files

assignment done

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