word = input("Введите слово: ")
new_word = ""
for letter in word:
if letter == "а":
new_word += "о"
elif letter == "и":
new_word += "е"
elif letter == "ы":
new_word += "у"
elif letter == "я":
new_word += "э"
elif letter == "о":
new_word += "а"
elif letter == "е":
new_word += "и"
elif letter == "у":
new_word += "ы"
elif letter == "э":
new_word += "я"
elif letter == "А":
new_word += "О"
elif letter == "И":
new_word += "Е"
elif letter == "Ы":
new_word += "У"
elif letter == "Я":
new_word += "Э"
elif letter == "О":
new_word += "А"
elif letter == "Е":
new_word += "И"
elif letter == "У":
new_word += "Ы"
elif letter == "Э":
new_word += "Я"
else:
new_word += letter
print(new_word)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
word = input("Введите слово: ")
new_word = ""
for letter in word:
if letter == "а":
new_word += "о"
elif letter == "и":
new_word += "е"
elif letter == "ы":
new_word += "у"
elif letter == "я":
new_word += "э"
elif letter == "о":
new_word += "а"
elif letter == "е":
new_word += "и"
elif letter == "у":
new_word += "ы"
elif letter == "э":
new_word += "я"
elif letter == "А":
new_word += "О"
elif letter == "И":
new_word += "Е"
elif letter == "Ы":
new_word += "У"
elif letter == "Я":
new_word += "Э"
elif letter == "О":
new_word += "А"
elif letter == "Е":
new_word += "И"
elif letter == "У":
new_word += "Ы"
elif letter == "Э":
new_word += "Я"
else:
new_word += letter
print(new_word)