Created
August 16, 2022 02:19
-
-
Save FranklyFuzzy/6f77ed35b66c94fa715cb03ccbfefdbe to your computer and use it in GitHub Desktop.
Quick shift cipher using ord and chr
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
#Found an issue where going from negative to positive int removes space so just shift starting positive int then shift back negative the same int. | |
text = input('what is the text: ') | |
key = input('What is the shift: ') | |
for i in text: | |
uni = ord(i) | |
encode = int(uni) + int(key) | |
print(chr(encode), end='') | |
#print(i, uni) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment