Skip to content

Instantly share code, notes, and snippets.

@Younes-Charfaoui
Created October 30, 2020 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Younes-Charfaoui/1e47c11fbf1d9ce15e3e54b582087eaa to your computer and use it in GitHub Desktop.
Save Younes-Charfaoui/1e47c11fbf1d9ce15e3e54b582087eaa to your computer and use it in GitHub Desktop.
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