Aug-21-2020, 09:58 AM
Hi,
I've been learning python for a week and today i started doing a translator in an invented language. The problem is that if i write an upper letter, it is translated as a lower letter.
Here is the code
I've been learning python for a week and today i started doing a translator in an invented language. The problem is that if i write an upper letter, it is translated as a lower letter.
Here is the code
def translate(phrase): translation = "" for letter in phrase: if letter.lower() in "aeiou": if letter.isupper(): translation = translation + "G" else: translation = translation + "g" else: translation = translation + letter return translation print(translate(input("Enter a phrase")))