This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

16 lines
372 B
Python

def rot13(string):
decode=""
for i in range(0,len(string)):
if ord(string[i])<=109:
decode+=(chr(ord(string[i])+13))
else:
decode+=(chr(ord(string[i])-13))
return decode
#main program
s = input("Enter the string to encrypt:")
print(rot13(s))
#chr() returns the character of the ASCII
#ord() returns the ASCII