Nov-25-2018, 09:13 PM
(Nov-24-2018, 11:15 PM)ichabod801 Wrote:(Nov-24-2018, 10:18 PM)skrivver99 Wrote: Your solution did not work.Then the correct thing to do would have been to post that my solution didn't work and exactly how it didn't work in the previous thread. Did you use the correction that I posted after finding two different e's in your code? Because I just ran that and it works.
I posted the exact code including your correction. This is the code that didn't work. Here it is again:
def translate(phrase): translation = "" for letter in phrase: if letter in "Aa": translation = translation + "a" elif letter.lower() in "b": if letter.isupper(): translation = translation + "Б" else: translation = translation + "б" elif letter in "Ll": translation = translation + "л" elif letter in 'Ii' and translation[-2:] == 'ке': translation = translation[:-2] + "cи" elif letter in "Cc" and translation[+2:] == "ei": translation = translation[:+2] + "си" elif letter in 'Ii': translation = translation + "и" elif letter in 'Ii': translation = translation + "и" elif letter in "Ii": translation = translation + "и" elif letter in "Ee": translation = translation + "е" elif letter in "Ff": translation = translation + "ф" elif letter in "cei": translation = translation + "си" elif letter in "Dd": translation = translation + "д" elif letter in "Gg": translation = translation + "г" else: translation = translation + letter ''' This list Needs to be completed ''' return translation