Created
October 30, 2020 16:43
-
-
Save Younes-Charfaoui/1e47c11fbf1d9ce15e3e54b582087eaa to your computer and use it in GitHub Desktop.
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
alphas = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] | |
test = (input("put the number that u want to decrypt : ")) | |
test_num = len(str(test)) | |
count = 0 | |
main_word = "" | |
one_alphabet = "" | |
alphas_index = 0 | |
for x in range(0,test_num): | |
char = int((test[count])) | |
for i in alphas: | |
for j in range(0,char): | |
if char == alphas_index: | |
one_alphabet = str(alphas[char-1]) | |
else: | |
alphas_index += 1 | |
main_word = main_word + one_alphabet | |
count += 1 | |
alphas_index = 0 | |
print(main_word) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment