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 RĂ©ponses
+ 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!!