Skip to content
Snippets Groups Projects
Select Git revision
  • 7ac05a4d8ecff53d06bd351a46c361c3ea0d9204
  • master default
2 results

README.md

Blame
  • CSE16261_Ex02_09.py 250 B
    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)