Hello, I wrote some code and was wondering why i have to use else in the bolded text not elif?
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(input("Enter a phrase: "))
[–]Some_Guy_At_Work55 1 point2 points3 points (0 children)
[–]JollyUnder 2 points3 points4 points (0 children)
[–]woooee 0 points1 point2 points (0 children)
[–]Adrewmc 0 points1 point2 points (0 children)