alphabet = ['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','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']
def cypher(text,shift,direction):
cipher = ''
if direction == "decrypt":
shift *= -1
for char in text:
if char in alphabet:
position = alphabet.index(char)
new_position = position + shift
new_char = alphabet[new_position]
cipher += new_char
else:
cipher += char
print(f"This is your {direction}ed text\n {cipher}")
# proceed = True
# while proceed:
# direction = input("Do You Want to Encrypt or Decrypt? \n ").lower()
# text = input("Type the word: ").lower()
# shift = int(input("Type the key: "))
# shift = shift % 26
# cypher(text,shift,direction)
# kontinue = input("Do you want to continue? Type Y or N : ").lower()
# if kontinue == "N":
# proceed = False
# break