Skip to content

Instantly share code, notes, and snippets.

@AtufaShireen
Created April 27, 2019 14:31
Show Gist options
  • Save AtufaShireen/0a07c0c23c8b72ef8c673a96e0af2449 to your computer and use it in GitHub Desktop.
Save AtufaShireen/0a07c0c23c8b72ef8c673a96e0af2449 to your computer and use it in GitHub Desktop.
cipher1
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