0
Uppercase for input
Hello everyone! Is there a way to add upper() to the input in my code so I don’t have to add it every time before returning/printing it? How? https://code.sololearn.com/cUbFcszE1PE6/?ref=app
2 ответов
+ 3
Like this?
name = input().upper()
def change_final(word):
if word[-1] in "AEIOUY":
return word + "DINO ♥!"
elif word[-1] in "BCDFGHJKLMNPQRSTVWXZ":
return word + word[-1] + "INOU ♥ !"
print("Hello " + change_final(name))
+ 1
Rik Wittkopp Yes, like this!
I had already tried the “name = input().upper()” but couldn’t get it to work with my code as it was. But now, it works perfectly with the other changes you made. Thank you!!