Created
April 27, 2019 14:31
-
-
Save AtufaShireen/0a07c0c23c8b72ef8c673a96e0af2449 to your computer and use it in GitHub Desktop.
cipher1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
norm_string=input("enter a word: ") | |
secret_code="" | |
for char in norm_string: | |
secret_code+=str(ord(char)-35) | |
print(secret_code) | |
norm_string="" | |
for i in range(0,len(secret_code)-1,2): | |
char_code=secret_code[i] + secret_code[i+1] | |
norm_string+=chr(int(char_code)+35) | |
print(norm_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment