Hi, I am having an issue trying to build a functioning translator for Python 3.5 in IDLE. I want each letter I input to be converted to a new letter on the other end. Here is the code:
aaбbкc
Am I doing something wrong? Please help.
def translate(phrase): translation = "" for letter in phrase: if letter in "Aa": translation = translation + "a" if letter in "Bb": translation = translation + "б" if letter in "Cc": translation = translation + "к" if letter in "Ll": translation = translation + "л" if letter in "Ii": translation = translation + "и" else: translation = translation + letter return translation print(translate(input("Enter word: ")))As the user I then type "abc" for example, and get this:
aaбbкc
Am I doing something wrong? Please help.