alphabet = "abcdefghijklmnopqrstuvwxyz"
input_text = "twas"
cipher_key = 15
cipher_text = ""
character = input_text[0]
character_position = alphabet.find(character)
new_position = character_position + cipher_key
if new_position >= len(alphabet):
new_position = new_position - len(alphabet)
new_letter = alphabet[new_position]
cipher_text = cipher_text + new_letter
print(cipher_text)
character = input_text[1]
character_position = alphabet.find(character)
new_position = character_position + cipher_key
if new_position >= len(alphabet):
new_position = new_position - len(alphabet)
new_letter = alphabet[new_position]
cipher_text = cipher_text + new_letter
print(cipher_text)
character = input_text[2]
character_position = alphabet.find(character)
new_position = character_position + cipher_key
if new_position >= len(alphabet):
new_position = new_position - len(alphabet)
new_letter = alphabet[new_position]
cipher_text = cipher_text + new_letter
print(cipher_text)
character = input_text[3]
character_position = alphabet.find(character)
new_position = character_position + cipher_key
if new_position >= len(alphabet):
new_position = new_position - len(alphabet)
new_letter = alphabet[new_position]
cipher_text = cipher_text + new_letter
print(cipher_text)
alphabet = "abcdefghijklmnopqrstuvwxyz"
input_text = "twas brillig in the slithy tove"
cipher_key = 15
cipher_text = ""
for character in input_text:
character_position = alphabet.find(character)
new_position = character_position + cipher_key
if new_position >= len(alphabet):
new_position = new_position - len(alphabet)
new_letter = alphabet[new_position]
cipher_text = cipher_text + new_letter
print(cipher_text)